Obgect:
All data types are obgect types;
Universal type var: the original variable is unchanged and replaced with Var;
Dynamic type: Like object, traversal needs to go;
is as:
type conversion operators;
(Type) object: Cast, if the conversion is unsuccessful, there will be an exception;
ArrayList arr = new ArrayList ();
Arr. ADD ();
foreach (Obgect o in arr)
{
If (O is Random)
{
Random r = (random) o;
Console.WriteLine (R.next (1,11));
}
}
is to determine whether an object or variable is a type that returns a bool;
ArrayList arr = new ArrayList ();
Arr. ADD ();
foreach (Obgect o in arr)
{
Random r = o as Random;
if (r! = null)
Console.WriteLine (R.next (1,11));
}
As type conversion if an object can be converted to a type, then he will convert;
If it cannot be converted to a type, NULL is returned and no error is made;
Universal variable var
Dynamically typed dynamic
generic type <t>:
Generic collection
Fixed type, not fixed length;
List<int> ABC = new list<int>;
Abc. Count ();
Class Library:
Commissioned:
Delegate
C # Object-oriented fragmented knowledge points