Recent Questions
.Net Framework : What is difference between string and stringbuilder?

What is difference between string and stringbuilder?

String is for simple string operations while StringBuilder is used to perform high manipulation stri....
Category: .Net Framework Date: 7/3/2010 1:55:44 PM
C# : Can we have a variables inside the interface?

Can we have a variables inside the interface?

No, we can have only methods, properties, indexers and enums inside the interface.
Category: C# Date: 7/3/2010 1:54:37 PM
C# : What is static class and what is use of this?

What is static class and what is use of this?

Static class we define when we do not want to create a object of class, all methods of static class ....
Category: C# Date: 7/3/2010 1:54:06 PM
OOPs Concepts : What is difference between overloading and overriding?

What is difference between overloading and overriding?

Having same name methods with different parameters is called overloading, while having same name and....
Category: OOPs Concepts Date: 7/3/2010 1:53:22 PM
.Net Framework : What is difference between Monitor.Enter and Monitor.TryEnter functions?

What is difference between Monitor.Enter and Monitor.TryEnter functions?

Monitor.Enter waits for the lock until it does not get it, while Monitor.TryEnter will request for l....
Category: .Net Framework Date: 7/3/2010 1:52:22 PM
C# Interview Questions and Answers
<< Previous Question Next Question >>
Question: 299 Page Views: 

How do you mark a method obsolete in C#?



Posted By: Avi Date: 30 October 2009 06:54:21 AM
Answer:

[Obsolete] public int MethodName() {...}

OR

[Obsolete(\"This is a message describing why this method is obsolete\")] public int MethodName() {...}


Posted By: eTechPlanet


Date: 30 October 2009 06:54:21 AM

By using Obsolete Keyword


Posted By: Johndecruse


Date: 17 February 2010 12:59:57 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
8SuzvM