dynamic in c#
static void Main(string[] args)
{
dynamic dynamicVariable = 100;
Console.WriteLine("Dynamic variable value: {0}, Type: {1}",dynamicVariable, dynamicVariable.GetType().ToString());
dynamicVariable = "Hello World!!";
Console.WriteLine("Dynamic variable value: {0}, Type: {1}", dynamicVariable, dynamicVariable.GetType().ToString());
dynamicVariable = true;
Console.WriteLine("Dynamic variable value: {0}, Type: {1}", dynamicVariable, dynamicVariable.GetType().ToString());
dynamicVariable = DateTime.Now;
Console.WriteLine("Dynamic variable value: {0}, Type: {1}", dynamicVariable, dynamicVariable.GetType().ToString());
}
Also in C#:
- how to stream video from vlc in c#
- switch case c# range
- convert string to datetime c#
- unity mobile controls
- visual studio clear text script
- .netstandard distinctby iqueryable
- c# multiline comment
- unity if gameobject exists
- string length c#
- c# length of array
- c# public static string
- c# object clone
- return random from enum
- c# reverse list
- c# md5 string
- sort datatable c#
- play animation through script unity
- unity hide mouse
- c# only letters
- parsing string to int c#
- Assets/Scripts/Snake.cs(187,10): error CS0029: Cannot implicitly convert type `UnityEngine.Vector2Int' to `System.Collections.Generic.List<UnityEngine.Vector2Int>'
- two players one phone unity gamne
- how to add to an array c#
- eager loading vs lazy loading c#