Type 'dynamic' are used to bypass the compile time type checking and are resolved at run time. You can use 'dynamic' to specify a dynamic variable.
In the following C# Console Project, a dynamic variable is defined which is initially of type 'string' and later in the program is assigned to a integer type.
Once defined d remains dynamic as shown here:
The above program complies and here is result:
In the following C# Console Project, a dynamic variable is defined which is initially of type 'string' and later in the program is assigned to a integer type.
Once defined d remains dynamic as shown here:
The above program complies and here is result:
No comments:
Post a Comment