Author Archives: Gaurav

Difference between abstract classes and interfaces

Very basic question but important to point out. Abstract classes can have concrete methods while interfaces have no methods implemented. Interfaces do not come in inheriting chain, while abstract classes come in inheriting chain. Interfaces have only pure virtual abstract method, while abstract classes may have non-abstract methods. All members are public [by default] in

Read More

How to locate names of all columns in a table?

I found the following query is very much worth-full when you are looking for names of all columns in a table SELECT (o.name) AS [Table Name], o.type, c.name AS [Col Name], s.name AS [Col Type], c.prec, c.scale, c.isnullableFROM dbo.sysobjects AS o INNER JOIN dbo.syscolumns AS c ON c.id = o.id INNER JOIN dbo.systypes AS s

Read More

Testing a Private Assembly

Lets start to create a client application for privateassembly, Open a notepad and write following code [till now you have not created any client application using visual studio, you will do the same very soon in ASP.Net section]. For this example lets create a client application using Console application from templates pane [windows applications are

Read More

Creating a Private Assembly

In Visual Studio .NET there is always an assembly whether you choose a class library project or an exe project. Now, let’s start some practical work. Start Visual Studio 2005 Choose a new C# project [File -> New Project] From template pane choose Class Library Template Set the Location : F:myWrittingsCSharpBookSource Codes Name : privateAssembly

Read More

How to view an Assembly

To view the assembly means to view the IL code, ILDASM converts the whole exe ordll into IL Code. To start the same: Go to C:Program FilesMicrosoft Visual Studio 8SDKv2.0Bin and then double clickon ildasm.exe Open SDK command prompt and type ildasm Now in ildasm open assembly File -> Open [or ctrl+O] Double click on

Read More