Csharp/C Sharp/Language Basics/null
Версия от 15:31, 26 мая 2010; (обсуждение)
null pointer
using System;
public class MainClass {
public static void Main(string[] args) {
MyObject localObject = new MyObject();
Console.WriteLine("localObject.n is {0}", localObject.n);
if (localObject.nextObject == null) {
Console.WriteLine("localObject.nextObject is null");
}
}
public class MyObject {
internal int n;
internal MyObject nextObject;
}
}