What is obsolete method?

 Posted by Virendradugar on 12/15/2009 | Category: C# Interview questions | Views: 7924
Answer:

Obsolete means old or no longer in use. We can define a method as obsolete using Obsolete keyword/attribute.

[Obsolete] 

public int Fun1()
{

//Code goes here.

}


or

[Obsolete("Any user define message")] public int Fun1() 

{

//Code goes here..

}


One thing to note here is O is always capital in Obsolete.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response