[ Source ]using System;
namespace ex
{
/// <summary>
/// Summary description for Class1.
/// </summary>
///
public class Overloading
{
public void PrintValue(int i)
{
Console.WriteLine("Argument have One!!");
}
public void PrintValue(double f)
{
Console.WriteLine("Argument is float type!!");
}
public void PrintValue(int i,int j)
{
Console.WriteLine("Arguments has Two!!");
}
public void PrintValue(int i,int j, int k)
{
Console.WriteLine("Arguments has Three!!");
}
}
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
Overloading mo = new Overloading();
mo.PrintValue(10);
mo.PrintValue(3.14f);
}
}
}
댓글
댓글 쓰기