Partial Type

In computing, a partial type is a data type definition which spans multiple source code files. In object orientated programming this may be necessary for a variety of reasons: performance and cost can often prohibit the use of several separate classes; the use of code generating tools is increasing, and it is convenient to separate machine generated code from code written by the programmer. Partial types are a feature of the C# 2.0 language. The syntax for creating a partial class definition is as follows: SourceFile1.cs
  public partial class ExampleClass  {     public void SomeFunction()     {         // ...     }  } 
SourceFile2.cs
  public partial class ExampleClass  {     public void SomeOtherFunction()     {         // ...     }  } 
In C# versions before 2.0, this would cause a compiler error because the same class appears to be defined twice (and also because of the partial keyword). In C# 2.0 this is treated as a single class definition. Other new features of C# 2.0 include anonymous methods, iterators and generics (similar to templates in C++). The use of partial classes has no effect on generated code (unless editor meta-data is emitted).

 

<< PreviousWord BrowserNext >>
moniker
tea infuser
ro gallegos
capodistria
seafair
san luis
monkeys in space
vincent youmans
gertrude lawrence
viedma
neuqun
dreams of terror and death: the dream cycle of h. p. lovecraft
canwest global communications
banned in the usa
santa rosa, argentina
san salvador de jujuy
silvertip
corrientes
contemporary philosophers
record breakers
h.p. lovecraft's dream cycle
tharg the mighty
forever delayed
hellinger toeplitz theorem
specialty channel
(52760) 1998 ml14
show trial
osteoclast
swing era
western reform
mesenchymal cell
2004 in architecture
2002 in architecture
secure channel
2001 in architecture
2000 in architecture
pharmacognosy
1998 in architecture
ho oh
ftp server
1996 in architecture
1995 in architecture
welsh football league first division
1994 in architecture