Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'member' is obsolete
The class designer marked a member with the Obsolete attribute. This means that the member might not be supported in a future version of the class.
The following sample shows how accessing an obsolete member generates CS0612:
// CS0612.cs
// compile with: /W:1
using System;
class MyClass
{
[Obsolete]
public static void ObsoleteMethod()
{
}
[Obsolete]
public static int ObsoleteField;
}
class MainClass
{
static public void Main()
{
MyClass.ObsoleteMethod(); // CS0612 here: method is deprecated
MyClass.ObsoleteField = 0; // CS0612 here: field is deprecated
}
}