FreeJobAlert

FreeJobAlert.Com

Government Jobs | Results | Admit Cards

Advertisement

Csharp dynamic binding code example

C# 4.0 new feature - dynamic binding code example using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DynamicTypeSample1 { class Program { static void Main(string[] args) { dynamic obj = new ShowAboutme(); obj.Name = "Babu"; obj.Age = 28; dynamic message =" Welcome to Dynamimc World "; dynamic result = obj.Getinformation(message); Console.WriteLine(result); Console.ReadKey(true); } } public class ShowAboutme { public dynamic Name { get; set; } public int Age { get; set; } public dynamic Getinformation(dynamic param1) { dynamic returnvalue="My name is" + Name + "and" + Age +"Year old \n" +param1; return returnvalue; } } }

Tags: .Net Framework, c sharp features, csharp 4.0 new features, csharp 4.0, .net interview questions and answers, c sharp interview questions, dynamic binding in c sharp