programming-examples/c-sharp/Functions/C# Program to Create Obsolete Class.cs
2019-11-15 12:59:38 +01:00

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