GO-V.ORG
As seen in

C Sharp 2.0

The computer programming language, C#, introduces several new features in version 2.0 (corresponding to the 3rd edition of the ECMA-334 standard and the .NET Framework 2.0).[src] These include:[src]

The computer programming language, C#, introduces several new features in version 2.0 (corresponding to the 3rd edition of the ECMA-334 standard and the .NET Framework 2.0).[src] These include: public partial class MyClass { public void MyMethod1() { // Manually written code } } file2.cs: public partial class MyClass { public void MyMethod2() { // Automatically generated code } } // Method that takes an iterable input (possibly an array) // and returns all even numbers.[src] public static IEnumerable GetEven(IEnumerable numbers) { foreach (int i in numbers) { if (i % 2 == 0) yield return i; } } There is also a yield break statement, in which control is unconditionally returned to the caller of the iterator.[src] There is an implicit yield break at the end of each generator method.[src] int SumOfArrayElements(int[] array) { int sum = 0; Array.ForEach(array, delegate(int x) { sum += x; } ); return sum; } Unlike some closure implementations, each anonymous delegate instance has access to the same relative memory location for each bound variable, rather than to the actual values at each creation.[src] See a fuller discussion of this distinction.[src] string status = string.Empty; public string Status { get { return status; } // anyone can get value of this property, protected set { status = value; } // but only derived classes can change it } Nullable value types (denoted by a question mark, e.g.[src] int?[src] i = null; ) which add null to the set of allowed values for any value type.[src] This provides improved interaction with SQL databases, which can have nullable columns of types corresponding to C# primitive types: an SQL INTEGER NULL column type directly translates to the C# int?[src] .[src] Nullable value types received an improvement at the end of August 2005, shortly before the official launch, to improve their boxing characteristics: a nullable variable which is assigned null is not actually a null reference, but rather an instance of struct Nullable with property HasValue equal to false .[src] When boxed, the Nullable instance itself is boxed, and not the value stored in it, so the resulting reference would always be non-null, even for null values.[src] The following code illustrates the corrected flaw: int?[src] i = null; object o = i; if (o == null) System.Console.WriteLine("Correct behaviour - runtime version from September 2005 or later"); else System.Console.WriteLine("Incorrect behaviour - pre-release runtime (from before September 2005)"); When copied into objects, the official release boxes values from Nullable instances, so null values and null references are considered equal.[src] The late nature of this fix caused some controversy , since it required core-CLR changes affecting not only .NET2, but all dependent technologies (including C#, VB, SQL Server 2005 and Visual Studio 2005).[src] object nullObj = null; object obj = new Object(); return nullObj ??[src] obj; // returns obj The primary use of this operator is to assign a nullable type to a non-nullable type with an easy syntax: int?[src] i = null; int j = i ??[src] 0; // If i is not null, initialize j to i.[src] Else (if i is null), initialize j to 0.[src]

23 sentences · 23 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"C Sharp 2.0." encyclopegia.org, 2026, https://encyclopegia.org/wiki/c-sharp-2-0. Accessed 03 December 2026.

Chicago

"C Sharp 2.0." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/c-sharp-2-0.

APA

encyclopegia.org. (2026). C Sharp 2.0. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/c-sharp-2-0

Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Sharp County

stub · references available

Dee Dee Sharp

stub · references available

Operation Sharp Guard

stub · references available

Sharp PC-1403

stub · references available

Sharp Nemesis NXT

stub · references available

Don Sharp

stub · references available

Sharp's Commercials

stub · references available

Sharp-billed Canastero

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1337427351 · 0.5 · snapshot enwiki-001337427351

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.