.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> .NET Framework >> Post New QuestionBookmark and Share Subscribe to Forum

what is METHODS?

Posted By: RASHMI KUSHWAHA     Posted Date: August 02, 2011    Points:5   Category :.NET Framework
what is METHODS in .net framework? Please explain.

Responses
Author: Amit Mehra             
Posted Date: August 03, 2011     Points: 20   

HI,

A method is a code block containing a series of statements. In C#, every executed instruction is done so in the context of a method.

Methods are declared within a class or struct by specifying the access level, the return value, the name of the method, and any method parameters. Method parameters are surrounded by parentheses, and separated by commas. Empty parentheses indicate that the method requires no parameters. This class contains three methods:

Ref - msdn

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Gowthammanju             
Posted Date: August 10, 2011     Points: 20   

Hey


A method group is the name for a set of methods (that might be just one) - i.e. in theory the ToString method may have multiple overloads (plus any extension methods): ToString(), ToString(string format), etc - hence ToString by itself is a "method group".

It can usually convert a method group to a (typed) delegate by using overload resolution - but not to a string etc; it doesn't make sense.

Once you add brackets, again; overload resolution kicks in and you have unambiguously identified a method call.

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Narayanan             
Posted Date: August 16, 2011     Points: 20   

http://msdn.microsoft.com/en-us/library/1xac6e1y%28v=vs.80%29.aspx
http://forum.allaboutcircuits.com/blog.php?b=22

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Vinodh             
Posted Date: August 26, 2011     Points: 20   

Example for mehtod: Main() method is the entry point for every c # application when your program is started.
Mehtods can be secured from invoking it from other program by making it private.



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend