What types are required by C#? [duplicate]
Possible Duplicate:
Which parts of C# .NET framework are actually parts of the language?
There are some features of C# that require specific type (“the type has to implement System.IDisposable
”). Other features are based on patterns (“any type that has something that looks like a method called Select()
with the proper signature”).
What is the minimum set of types that C# requires from the library (the former case above)? How does that dif开发者_如何学Cfer from other languages like VB.NET and F#?
IDisposable is an interface, .Net provivdes interfaces as a means to develop contract based APIs rather than relying on concrete classes. Eg, It lets you say, 'any type as long as it has a method called Dispose()'
This is nothing much to do with the C# type system nor it's primitive types.
精彩评论