¡@

Home 

c# Programming Glossary: myinterface

Generating a custom compile time warning C#

http://stackoverflow.com/questions/1420143/generating-a-custom-compile-time-warning-c-sharp

Type MyClassType System.Diagnostics.Debug.Assert typeof MyInterface .IsAssignableFrom MyClassType Editor must implement interface.. MyClassType Editor must implement interface typeof MyInterface .Name The second case which interests me is where I have a type..

Why are C# 4 optional parameters defined on interface not enforced on implementing class?

http://stackoverflow.com/questions/4922714/why-are-c-sharp-4-optional-parameters-defined-on-interface-not-enforced-on-imple

optional on any implementing class public interface MyInterface void TestMethod bool flag false public class MyClass MyInterface.. void TestMethod bool flag false public class MyClass MyInterface public void TestMethod bool flag Console.WriteLine flag and.. obj.TestMethod compiler error var obj2 new MyClass as MyInterface obj2.TestMethod prints false Does anyone know why optional parameters..