C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 334 Page Views: 

How do you use delegates(write code using Action delegate)?



Posted By: Avi Date: 14 October 2010 06:45:31 AM
 Answer:

Action a = () => Console.WriteLine(“something”); a.Invoke();


Posted By: avibtech


Date: 14 October 2010 06:45:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image iBKSab
Related Questions
C# : Can interface inherit from other interfaces?

Can interface inherit from other interfaces?

Yes
Category: C# Date: 10/14/2010 3:14:14 AM
C# : How do you send email from c#?

How do you send email from c#?

SmtpClient smtp = new SmtpClient(); smtp.Host = “10.0.0.1”; MailMessage mail = new MailMessage(); ma....
Category: C# Date: 10/14/2010 2:50:31 AM
C# : How do you handle command line arguments in C#?

How do you handle command line arguments in C#?

args parameter of the main contains all command line parameters. You can also use Environment.GetCom....
Category: C# Date: 10/14/2010 2:19:32 AM
C# : How do you call garbage collection?

How do you call garbage collection?

GC.Collect();
Category: C# Date: 10/14/2010 2:14:47 AM
C# : How can you define partial class?

How can you define partial class?

Using partial keyword
Category: C# Date: 10/14/2010 2:04:46 AM