C# supports two kinds of types: value types and reference types. Value types include
simple types (e.g., char, int, and float), enum types, and struct types.
A D V E R T I S E M E N T
Reference
types include class types, interface types, delegate types, and array types.
Value types differ from reference types in that variables of the value types directly
contain their data, whereas variables of the reference types store references to
objects. With reference types, it is possible for two variables to reference the same
object, and thus possible for operations on one variable to affect the object referenced
by the other variable. With value types, the variables each have their own copy of the
data, and it is not possible for operations on one to affect the other.
The example
The example
using System;
class Class1
{
public int Value = 0;
}
class Test
{
static void Main () {
int val1 = 0;
int val2 = val1;
val2 = 123;
Class1 ref1 = new Class1();
Class1 ref2 = ref1;
ref2.Value = 123;
Console.WriteLine("Values: {0}, {1}", val1, val2);
Console.WriteLine("Refs: {0}, {1}", ref1.Value, ref2.Value);
}
}
The first argument is a string, which may contain numbered placeholders like {0}
and {1}. Each placeholder refers to a trailing argument with {0} referring to the
second argument, {1} referring to the third argument, and so on. Before the output
is sent to the console, each placeholder is replaced with the formatted value of its
corresponding argument
Developers can define new value types through enum and struct declarations, and can
define new reference types via class, interface, and delegate declarations.
Eliminating the Time Wasters
The Time-wasters will surround you all the sides and will tear away at your minutes and
hours, holding the back from producing a critical results which are vital to the success
in the career.
Eliminate a time wasters in life;
The Law of an Excluded Alternative;
Identify a major time-wasters;
Practical ways to overcome and avoid them if possible.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords .NET Type, net system type, asp net content type, aspx file type, asp net data types, type in net,
net content type, vb net system type, aspx mime type, net file type, vb net datatype,
net decimal type, net input type file, asp net input type file, data types in vb net,
net type conversion, net value types, asp net datatype, net exception types