Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


C# Language

Regular Expressions with .net – U.S. Social Security Numbers


Regular Expressions with .net – U.S. Social Security Numbers

In the United States, a Social Security number (abbreviated as SSN) is a nine-digit number issued to U.S. citizens, permanent residents, and temporary (working) residents. U.S. social security numbers are three sets of digits separated by hyphens; the first set contains three digits, the second set contains two digits, and the third set contains four digits. Its primary purpose is to track individuals for taxation purposes. In recent years the SSN has become a de facto national identification number. A properly formatted US social security number. first three digits must be 001 – 772.

Regular Expression Pattern

^((?!000)([0-6]\d{2}|[0-7]{2}[0-2]))-((?!00)\d{2})-((?!0000)\d{4})$

A description of the regular expression:

[1]: A numbered capture group. [(?!000)([0-6]\d{2}|[0-7]{2}[0-2])]
(?!000)([0-6]\d{2}|[0-7]{2}[0-2])
Match if suffix is absent. [000]
[2]: A numbered capture group. [[0-6]\d{2}|[0-7]{2}[0-2]]
Select from 2 alternatives
[0-6]\d{2}
Any character in this class: [0-6]
Any digit, exactly 2 repetitions
[0-7]{2}[0-2]
Any character in this class: [0-7], exactly 2 repetitions
Any character in this class: [0-2]
-
[3]: A numbered capture group. [(?!00)\d{2}]
(?!00)\d{2}
Match if suffix is absent. [00]
Any digit, exactly 2 repetitions
-
[4]: A numbered capture group. [(?!0000)\d{4}]
(?!0000)\d{4}
Match if suffix is absent. [0000]
Any digit, exactly 4 repetitions


Read the rest of this entry »

How to Get a Free C# Command Line Compiler


How to Get a Free C# Command Line Compiler

When you buy Visual Studio 2005, you get the full-featured integrated development environment (IDE). If you don’t have Visual Studio 2005, You can also get a free C# compiler by using one of the following options:
You can get the command-line compiler (csc.exe) from Microsoft site

http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx.
Download the redistributable package of the .NET Framework, which includes the compiler and the .NET Framework with C# 2005 syntax support.


Read the rest of this entry »

C# Programming Language Introduction


C# Programming Language Introduction

Microsoft’s .NET Framework represents the most significant change in software development methodology for a Microsoft operating system since the introduction of Windows. It is built using an architecture that allows software languages to work together, sharing resources and code, to provide developers with the advanced tools necessary to build the next generation of desktop and Internet-enabled applications.


Read the rest of this entry »

C# Coding Standards and Guidelines: Error Handling


C# Coding Standards and Guidelines: Error Handling

1. Error handler should be present whenever you anticipate possibility of error.

2. Do not use Try-catch for flow- control.

3. Never declare an empty catch block.

4. Error Message should be user friendly, simple and understandable.


Read the rest of this entry »

C# Coding Standards and Guidelines: Comments


C# Coding Standards and Guidelines: Comments

1. All source code must include the following comments at the very top:

/********************************************************
*Author:
*Date:
*Description:
*Revision:
********************************************************/

2. All comments should be written in English(like in U.S. English).

3. Comments lines should begin with // indented at the same level as the code they are documenting.

4. Do not use /* … */ blocks for comments.


Read the rest of this entry »