Friday, October 5, 2012

SQl Server Tricks-Part2

Get list of all procedures created on a particular date in a database

To get the list of all the procedures created on a particular date in a data base, you can use this query.

Use YourDBName
Go
select name from sys.objects
where type = 'P'
and create_date=@yourdate
Go

Thursday, October 4, 2012

SQl Server Tricks-Part1

Getting the List of all databases on a server

To get list of all database on a server, you can use this query.
USE master
GO

SELECT
*
FROM sys.Databases
GO
OR you can use the sp_helpdb procedure for this.

Wednesday, September 19, 2012

Getting Information About Object's Type

You can get the information of type of the any object by calling the GetType method of System.Object. Because every type in .Net inherits directly or indirectly from System.Object, every object will have access to the GetType method.

GetType returns an instance of a Type object, which can be queried to learn all about the type of the original object.

Monday, September 17, 2012

Contextual Keywords

There are some keywords in C# that are considered contextual keyword, in that these are not reserved keywords but provides specific meaning in the code.Technically you can use these  keywords as an identifiers but you should avoid to doing this, since it could lead to confusion.

Saturday, September 15, 2012

Examine IL Using ildasm.exe

In .Net , source is compiled to an Intermediate Language called Common Intermediate Language. This  IL is later compiled into native code at runtime, running in a virtual machine.
You can examine the IL of your application by a tool called IL Disassembler (ildasm.exe). You can find this tool (ildasm) in directory: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

Ildasm will show you three basic things of IL :-
  • A list of all classes and methods in your assembly
  • The contents of the assembly’s manifest
  • IL code for any method implemented in the assembly.
 Here’s an example of what is displayed in ildasm.

IL














You can get more information from these sites-
  1. MSIL Disassembler (Ildasm.exe)
  2. Ildasm.exe Tutorial
^ Scroll to Top