开发者

What types are required by C#? [duplicate]

This question already has answers here: Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜