namespace CSharp.Tutorial
{
public class Program
{
public static dynamic
PrintInputs(dynamic value1, dynamic value2)
{
return value1.ToString() + value2.ToString();
}
static void Main(string[] args)
{
dynamic name;
var value= "Tutorial"; // Imilicit variable must be assigned at the time of creation
name = "SKMDotNet"; // Dynamic
variable allows post initialization.
Console.WriteLine($"{name} and
its type is: {name.GetType().ToString()}");
Console.WriteLine(PrintInputs(1,
2));
Console.WriteLine(PrintInputs($"{name} ", $"{value}"));
Console.ReadLine();
}
}
}
No comments:
Post a Comment