Articles in the CSharp Category
CSharp, MS SQL »
Writting a CLR Stored Proc
With the launch of SqlServer2005, we got the ability to write CLR from any .Net language.
Overview:
The following code-snippet tells how to write a simple CLR Stored Proc with the use of C#.
Step:
1. Start Visual Studio2005 or higher
2. Add new file from File -> New -> File
3. Select Class with C#
4. Mark the name as AStepAheadProc.cs
5. Write the following lines:
/* This Example is a part of different
* examples shown in Book:
* C#2008 Beginners: A Step Ahead
* Written by: Gaurav Arora
* Reach …
CSharp, Interview Questions »
The ref
The ref keyword causes argument passed by reference. The effect is that any chnages is made to the parameter in the method will be reflected in that variable when control passes back to the calling method. To use a ref parameter, both the method definition and the calling method must explicitly use the ref keyword.
An argument passed to to a ref parameter must first be initialized. his differs it from out whose argument need not be explicitly initialize before being passed.
Both ref and out are …
Asp.net, CSharp, Tutorial »
Code Dom: A Step Ahead Series
Introduction:
This is a continuation to my earlier post C#-The Language : A Step Ahead Series-Part-II
The following code snippet showed the power of CODE DOM:
/* This Example is a part of different
* examples shown in Book:
* C#2005 Beginners: A Step Ahead
* Written by: Gaurav Arora
* Reach at : msdotnetheaven*/
// File name : CodeDomExpl.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.CodeDom;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
using System.IO;
namespace CSharp.AStepAhead.CodeDomExpl
{
public class CodeDomExpl
{
public static void Main()
…
