Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
219 captures
03 May 2008 - 03 Jul 2025
JunAUGOct
Previous capture26Next capture
201020112012
success
fail
COLLECTED BY
Organization:Alexa Crawls
Starting in 1996,Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to theWayback Machine after an embargo period.
Collection:Alexa Crawls
Starting in 1996,Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to theWayback Machine after an embargo period.
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20110826233800/http://msdn.microsoft.com:80/en-us/library/512aeb7t.aspx
Separator
Community Content
Avatar
  • Add code samples and tips to enhance this topic.
Separator
Advertisement
ExpandMinimize
MSDN

Generics (C# Programming Guide)

Visual Studio 2010

Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operations, as shown here:

No code example is currently available or this language may not be supported.
  • Use generic types to maximize code reuse, type safety, and performance.

  • The most common use of generics is to create collection classes.

  • The .NET Framework class library contains several new generic collection classes in theSystem.Collections.Generic namespace. These should be used whenever possible instead of classes such asArrayList in theSystem.Collections namespace.

  • You can create your own generic interfaces, classes, methods, events and delegates.

  • Generic classes may be constrained to enable access to methods on particular data types.

  • Information on the types that are used in a generic data type may be obtained at run-time by using reflection.

Community ContentAdd
Advertisement
© 2011 Microsoft. All rights reserved.
Terms of Use |Trademarks |Privacy Statement|Feedback FeedbackFeedback
Feedback
Tell us about your experience...
Did the page load quickly?
Yes No
Do you like the page design?
Yes No
How useful is this topic?
Tell us more

[8]ページ先頭

©2009-2025 Movatter.jp