You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
497 B
C#

/*
* C# Program to Create Obsolete Class
*/
using System;
class Program
{
static void Main()
{
MethodA();
MethodB();
Console.Read();
}
[Obsolete("Use MethodB Instead")]
static void MethodA()
{
}
static void MethodB()
{
Console.WriteLine(" MethodA shows an Warning when called and MethodB is not an Obsolete Method ");
}
}
/*
MethodA shows an Warning when called and MethodB is not an Obsolete Method