using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//Program for
Single Cast Delegate to Refer a Function in same Class
namespace CADelegates
{
class CADelegates1
{
static
void Display(string
S)
{
Console.WriteLine("This is " + S);
}
delegate
void X(string a);
static
void Main(string[]
args)
{
X
ObjD = new X(Display);
ObjD("Sampath
kumar vaddepally");
Console.Read();
}
}
}
|
Output :-
No comments:
Post a Comment