Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)


Articles on C# programming language.

Dynamic ExpandoObject in C#

Fig 1. Create Expando Object

In the previous article, we learned about Anonymous Type to define properties at runtime. But these properties are read only and the type will not allow changing it after creation. C# provides a class called DynamicExpando which will also allow adding the properties at runtime. But we can read and write the property values at runtime with this object. Since the type allow adding the members on the fly, the compiler will not perform any type checking. We can also…

Continue Reading →

Singing An Assembly via CommandLine & VS2017

Fig 01. Singning an Assembly with Visual Studio 2017

In the last article: Link, we saw how to create Key-Pair and how to store that in a container. Before reading this article, visit the link to know what is a Key File and a Key Container. Now, we will see how to sign an assembly with visual studio 2017 and command prompt. Signing an assembly is useful so that it cannot be modified by unauthorised people. Singing an assembly support deploying it in the GAC and allows versioning policy for the generated binary (Assembly).

Continue Reading →