Using code analysis in Visual Studio 2013

Visual Studio code analysis checks if your code is following programming standards. If you are a beginner developer you might have not even known coding standards exists. Code Analysis tools in Visual Studio Premium and Visual Studio Ultimate enable developers to check their code for quality issues as they write it. - Microsoft Documentation By default Visual Studio only checks for warnings and build errors and does not do code analysis while building....

July 19, 2015 · 2 min · 230 words · Fahad

.NET Evidence Based Security

To really get a better idea of .NET security we first have to talk a little about the CLR. The CLR plays a major role in security when deploying an application. These are the steps of a deployment: Retrieve the assembly's evidence (assembly's strong name, digital signature, sign code signature, and Internet zone where executed. Referencing the security policy - Determines the actions the code is allowed to perform....

July 18, 2015 · 2 min · 305 words · Fahad

How to make a dll in c#

Making a dll file is very useful if you need your code to be easily used in multiple places. Ex. Let's say you have a genius idea on how to add two numbers, but you don't want to make the code public in fear of someone stealing your idea and taking credit. Using a dll file is the most common and efficient way to achieve that. A DLL is a library that contains code and data that can be used by more than one program at the same time....

July 3, 2015 · 3 min · 548 words · Fahad

How to send email in C# asp.net

Knowing how to send email from a web application is very important. It is has many applications, some being email confirmation, forgot password, message to admin, promotions, any other generic messages and the list goes on and on. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 MailMessage message = new MailMessage(); SmtpClient client = new SmtpClient(); //Email fields message....

June 24, 2015 · 1 min · 183 words · Fahad

How to use large numbers in C#

All primitive type in every language have a limit as to what and how much they can store. We will be talking specifically about integers for now. Everyone has used different sizes of integral types to store a number, the most common being int. Here is a brief list of integral types we use on a daily basis. byte  0 - 255 short -32,768 to 32,767 int -2,147,483,648 to 2,147,483,647 long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 If you know you are only going to use positive number, then you can use the unsigned version of each type, which removes negative values and doubles the positive values....

June 24, 2015 · 2 min · 280 words · Fahad