Super User

Super User

Tuesday, 18 December 2012 17:55

c# namespaces

namespaces is a old concept in c# programming.both
java and c# uses this concept.a namespace is act like
a 'wrapper' around one or many elements which gives
them uniqueness.

It's a good idea to use a class say gateway where all
database access codes will be written.in this gateway class
you will implement db connection as follows -

first create another class -

in coding giving proper names to methods,classes,controls,
variables,others is neccessary and good programming practice.
think that a method name-show button click.

code behind file codes -

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

Monday, 17 December 2012 13:54

Simple Gridview control example

following codes shows how to use GridView control.Its a
simple example.

in app main file -

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;