English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

An example would be great.

2006-11-21 16:43:21 · 2 answers · asked by Christina 2 in Computers & Internet Programming & Design

2 answers

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.

2006-11-21 17:25:55 · answer #1 · answered by Anonymous · 0 0

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)

2006-11-22 01:34:12 · answer #2 · answered by dxsamran31 2 · 0 1

fedest.com, questions and answers