An example would be great.
What is a method in C#.NET?
A method (not just in C#, but also in other object oriented languages) is a function that is part of a class. It is for this reason sometimes also referred to as a member function.
class Test
{
public int Add(int x, int y)
{
return x + y;
}
}
In this example, Add() is a method of the Test class.
Reply:method is function that it can capsuled your code and run some related code in it.for example in windows application when you click any button it execute a method that do something(running some code)
avender
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment