What is an Architecture?
Architecture can be defined as set of rules and patterns.1. Partioning the problem to built into discrete pieces.
2. Techniques used to create interface between these pieces.
3. Techniques used to manage overall structure and flow.
4. Appropriate use of development and delivery approaches, techniques and tools.
It is important bcz
1. Control complexity.
2. Enable re-use
What is an Object Oriented Programming?
OOPs:- Its a programming technique based on Objects. It consits of class & their object. A class is a combination of
data members and member functions.
Class:- Its a real life entity. It is a combination of data member & member functions.
Objects:- It is an instance of class. for ex;- Hand is a class and left hand & right hand are its objects.
OR
OOP is a software programing concept that allow developer to split program in building block known as object to reduce the complexity, reusability.
OOPs Featuers:
1. Encapsulation: Wrapping up of data members and member functions under one name is Ecapsulation.
OR
IT is the process of combining real time object data, member and its different action on data within a single unit
2. Abstraction: Abstraction means to show only the necessary details of the object.
3. Polymorphism: It means methods with same name but with different arguments.
OOPs:- Its a programming technique based on Objects. It consits of class & their object. A class is a combination of
data members and member functions.
Class:- Its a real life entity. It is a combination of data member & member functions.
Objects:- It is an instance of class. for ex;- Hand is a class and left hand & right hand are its objects.
OR
OOP is a software programing concept that allow developer to split program in building block known as object to reduce the complexity, reusability.
OOPs Featuers:
1. Encapsulation: Wrapping up of data members and member functions under one name is Ecapsulation.
OR
IT is the process of combining real time object data, member and its different action on data within a single unit
2. Abstraction: Abstraction means to show only the necessary details of the object.
3. Polymorphism: It means methods with same name but with different arguments.
Access Modifiers
1. Public: Can be access within class n outside class.
2. Private: can be accessed only within class or method.
3. Protected: Can be accessed within class and in drived class.
4. Internal: Can be accessed within current assembly.
5. Protected Internal: Can be accessed within current assembly and drived class in other assembly.
Note: Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal.
Method Overriding / Virtual Methods
Virtual Method: A virtual property or method has an implementation in the base class, and can be overriden in the
derived classes. It cannot be private and needs to be public always.
public Virtual read()
derived classes. It cannot be private and needs to be public always.
public Virtual read()
Override Methods: Overriding is the action of modifying or replacing the implementation of the parent class with a new
one.
public Override read()
Note:
1. It is not necessary that a virtual method has override method, but a override method should always have a
virtual method declare in base class.
virtual method declare in base class.
2. While overriding a virtual method , its access modifiers needs to be same as in base class.
Sealed Keyword
Sealed Class/Method: Method or class declared with sealed keyword cannot be overridden.
Sealed Class/Method: Method or class declared with sealed keyword cannot be overridden.
Abstract Class:
1. Abstract class cannot be instantiated
2. It contains both abstract/non abstract method.
3. It must be inherit in other class
4. Access Modifiers: public, private, protected, internal , protected internal.
5. Abstract method declared with abstract keyword.and needs to be always public.
6. All abstract method needs to be define in derived class when we inherit it.
Interface:
Interface separates the implementation and defines the structure
1. Must implement
2. contains only method declaration and no defination.
3. Modifiers: always public, no need to define.
4. pure abstract class
5. we can define properties, methods & events in it.
6. Interface increase security by hiding the implementation
Implicit conversion: Converstion that done internally, like assigning value of int to bigint
Explicit Conversion: When we convert a type to another using Convert class.
1. Must implement
2. contains only method declaration and no defination.
3. Modifiers: always public, no need to define.
4. pure abstract class
5. we can define properties, methods & events in it.
6. Interface increase security by hiding the implementation
Implicit conversion: Converstion that done internally, like assigning value of int to bigint
Explicit Conversion: When we convert a type to another using Convert class.
SOA: A service-oriented architecture is essentially a collection of services. These services communicate with each
other. The communication can involve either simple data passing or it could involve two or more services coordinating
some activity
other. The communication can involve either simple data passing or it could involve two or more services coordinating
some activity
Difference Between Interface & Abstract class
1. Interface has no implementation, but they have to be implemented.
Abstract class’s methods can have implementations and they have to be extended.
2. Interface can inherit more than one interfaces
Abstract class can implement more than one interfaces, but can inherit only one class
Convert.ToString vs .tostring():- “Convert” function handles NULLS while “.ToString()”
does not it will throw a NULL reference exception error
Garbage Collector: The garbage collector checks to see if there are any objects in the heap that are no longer being
used by the application. If such objects exist, then the memory used by these objects can be reclaimed. (If no more
memory is available for the heap, then the new operator throws an OutOfMemoryException.)
Value Types:
bool
byte
char
decimal
double
enum
float
int
long
sbyte
short
struct
uint
ulong
ushort
Refrence Types:
class
interface
delegate
object
string
Stack: Its a value type, store value types and pointers.
Heap: Its a refrence type
Structures:
protected void Page_Load(object sender, EventArgs e)
{
abc a = new abc(2 , 4);
lblSum.Text = a.sum1().ToString();
}
public struct abc
{
public int sum;
public abc(int a, int b)
{
sum = a + b;
}
public int sum1()
{
return sum;
}
}
}
------------------------------------------------
Structure with Interface
------------------------------------------------
public interface aa
{
// no access specifier is given in interface methods (by defualt they are public)
double Increment();
void DisplayValues();
}
public struct Student : aa
{
int id;
int zipcode;
double salary;
public Student(int id, int zipcode, double salary)
{
this.id = id;
this.zipcode = zipcode;
this.salary = salary;
}
public void DisplayValues()
{
Console.WriteLine("ID: " + this.id.ToString());
Console.WriteLine("Zipcode : " + this.zipcode.ToString());
Console.WriteLine("Salary : " + this.salary.ToString());
}
public double Increment()
{
return(this.salary += 1000.00);
}
}
-------------------------------------------------
New(As Keyword): To create instance of a class.
New (As Modifier): To hide the base class method;
public class MyBaseC
{
public int x;
public void Invoke() {}
}
public class MyDerivedC : MyBaseC
{
new public void Invoke() {}
}
------------------------------------------------
Base Class keyword:
Calling methods: Using the base keyword, you can access any of a base class public or protected class members.
public class Parent
{
public void print()
{
Console.WriteLine("I'm a Parent Class.");
}
}
public class child:parent
{
public new void print()
{
base.print();
}
}
--------
Calling Constructor:
public class Parent
{
public Parent(string myString)
{
parentString = myString;
Console.WriteLine(parentString);
}
}
public class Child : Parent
{
public Child() : base("From Derived")
{
Console.WriteLine("Child Constructor.");
}
}
-------------------------------------------------------------------------
Early Binding: Properties and method can be identified by compile time.
ex; overloading, methods can be identified at compile time.
Late Binding: Properties and method can be identified by Run time.
ex: Overriding, methods can be identified at run time.
------------------------------------------------------------------------
Static Class: A class can be declared static, indicating that it contains only static members. It is not possible to
create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET
Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Use a static class to contain methods that are not associated with a particular object. For example, it is a common
requirement to create a set of methods that do not act on instance data and are not associated to a specific object in
your code. You could use a static class to hold those methods.
The main features of a static class are:
They only contain static members.
They cannot be instantiated.
They are sealed.
They cannot contain Instance Constructors (C# Programming Guide).
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it
is still possible to declare a static constructor to assign initial values or set up some static state. For more
information, see Static Constructors (C# Programming Guide).
class
interface
delegate
object
string
Stack: Its a value type, store value types and pointers.
Heap: Its a refrence type
Structures:
1. Its simple userdefined type.
2. Struct are lightweight objects & alternative of class.
3. They are created on stack and its easy to create struc variables and destroy them.
4. As stored in stack, so fast in performance then class.
5. They supports access modifiers, constructors,indexers,methods, fields, nested types,operators & properties.
6. Protected and Protected internal access modifiers are not supported by struct.
7. structures do not support compile-time initialization of instance fields, they cannot derive from
anything other than System.ValueType and they cannot be the base of another class.
ie: In structure we cannot initialize a variable outside contructor, It doesnt have initializer field. If we want to assign a value to variable then we have
to do it in constructor.
8. They may implement an interface.
9. They can be instantiated without using a new operator. but we can use new too.
10. We cannot override default constructor of structure with no parameters.
-----------------------------------------------protected void Page_Load(object sender, EventArgs e)
{
abc a = new abc(2 , 4);
lblSum.Text = a.sum1().ToString();
}
public struct abc
{
public int sum;
public abc(int a, int b)
{
sum = a + b;
}
public int sum1()
{
return sum;
}
}
}
------------------------------------------------
Structure with Interface
------------------------------------------------
public interface aa
{
// no access specifier is given in interface methods (by defualt they are public)
double Increment();
void DisplayValues();
}
public struct Student : aa
{
int id;
int zipcode;
double salary;
public Student(int id, int zipcode, double salary)
{
this.id = id;
this.zipcode = zipcode;
this.salary = salary;
}
public void DisplayValues()
{
Console.WriteLine("ID: " + this.id.ToString());
Console.WriteLine("Zipcode : " + this.zipcode.ToString());
Console.WriteLine("Salary : " + this.salary.ToString());
}
public double Increment()
{
return(this.salary += 1000.00);
}
}
-------------------------------------------------
New(As Keyword): To create instance of a class.
New (As Modifier): To hide the base class method;
public class MyBaseC
{
public int x;
public void Invoke() {}
}
public class MyDerivedC : MyBaseC
{
new public void Invoke() {}
}
------------------------------------------------
Base Class keyword:
Calling methods: Using the base keyword, you can access any of a base class public or protected class members.
public class Parent
{
public void print()
{
Console.WriteLine("I'm a Parent Class.");
}
}
public class child:parent
{
public new void print()
{
base.print();
}
}
--------
Calling Constructor:
public class Parent
{
public Parent(string myString)
{
parentString = myString;
Console.WriteLine(parentString);
}
}
public class Child : Parent
{
public Child() : base("From Derived")
{
Console.WriteLine("Child Constructor.");
}
}
-------------------------------------------------------------------------
Early Binding: Properties and method can be identified by compile time.
ex; overloading, methods can be identified at compile time.
Late Binding: Properties and method can be identified by Run time.
ex: Overriding, methods can be identified at run time.
------------------------------------------------------------------------
Static Class: A class can be declared static, indicating that it contains only static members. It is not possible to
create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET
Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Use a static class to contain methods that are not associated with a particular object. For example, it is a common
requirement to create a set of methods that do not act on instance data and are not associated to a specific object in
your code. You could use a static class to hold those methods.
The main features of a static class are:
They only contain static members.
They cannot be instantiated.
They are sealed.
They cannot contain Instance Constructors (C# Programming Guide).
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it
is still possible to declare a static constructor to assign initial values or set up some static state. For more
information, see Static Constructors (C# Programming Guide).
Static Constructor: A static constructor is used to initialize any static data, or to perform a particular action that
needs performed once only. It is called automatically before the first instance is created or any static members are
referenced.
Static constructors have the following properties:
1. A static constructor does not take access modifiers or have parameters.
2. A static constructor is called automatically to initialize the class before the first instance is created or any
static members are referenced.
3. A static constructor cannot be called directly.
4.The user has no control on when the static constructor is executed in the program.
5. A typical use of static constructors is when the class is using a log file and the constructor is used to write
entries to this file.
6. Static constructors are also useful when creating wrapper classes for unmanaged code, when the constructor can call
the LoadLibrary method.
http://msdn.microsoft.com/en-us/library/79b3xss3(VS.80).aspx
---------------------------------------------------------------------------------------
Security:
Levels of Security:
1. Authentication: To check the user identity.
2. Autorization: Authorization is the process of determining the rights and restrictions assigned to an authenticated
user.
3. Confidentiality: While the user is working with the application, you have to ensure that
nobody else is able to view sensitive data processed by the user. Therefore, you have to encrypt
the channel between the client’s browser and the web server. Furthermore, you possibly have
to encrypt data stored on the backend (or in the form of cookies on the client) if even database
administrators or other staff of the company where the web application is hosted may not view
the data.
4. Integrity: Finally, you have to make sure data transmitted between the client and the server is
not changed by unauthorized actors. Digital signatures provide you with a way to mitigate this
type of threat.
----------------------------------------------------------------------------------------
Response.write / Response.Output.write
Response.Write("This is simple String");
1. Unformatted Output.
2. It writed the text stream.
Response.Output.Write("Rocky is {0} at {1:d},"cool",DateTime.Now")
1. Formatted Output.
2. It writes the HTTP Output stream.
Typed/Untyped Dataset
Typed Dataset
A typed DataSet is DataSet that applies the information stored in XSD to generate a typed class. Information from the schema that
contains the tables, columns, and rows is stored in a XSd file
Advantage:
1. Typed datsets in some way reduce the overhead and might boost the performance as they already have the table schema with them
2. They reduce the chances of errors.
3. You can add validation code for the desired field in case of Typed datasets
4. They provide type-safe operations.
5. Any type mismatch erros can be caught at compile time instead of run time.
6. You can refer to the tables and columns with their respective name.No need to refer as tables(0) or column(0).
Untyped Dataset
The normal DataSet is the one which we create programatically are the untyped datasets ,as the information is extracted during
runtime .
Advantage:
1. if your table structure change frequently then u should use untyped dataset because to acces typed dataset changes u again need
modify the XSD file
---------
MISC QUES
What is an assembly?
Asp.net 3.5 Life Cycle?
Singleton class?
String vs String Builder?
Array vs ArrayList?
response.output.write vs response.write?
What is GAC? How to add or remove assembly from GAC?
event fire during page postback?
Authentication vs autorization?
Type Vs Untype Dataset?
Clone vs copy?
static vs private constructor?
web config settings?
What is ISAPI?
What is diff between cookies?
Session Storage In Proc,Out Proc, State server?
SQL Server
2 Largest Salary?
Having & Groupby?
Duplicate rows in table?
Select all employee whole dont have phone No?
Select Employee name having more then 1 phone no?
diff between union n union all?
remove column in table?
Trigger
Char varchar, Nvarchar?
Function vs SP?
Max number of parameter in SP? 2100 parameter in sql 2008. 1024 in SQL 2005,256 input and 256 output in sql 2000
sql injetion and attack problem ?
249 nonclustorindex in a table
Class: Is a logical entity.
ReplyDeleteObject: Is a Logical and phisical entity.
State of object is called instance. i.e When we create an object then it create the instance, and here State of object means type of variable, behavior of variable ,its initialization etc.
ReplyDeleteIndexer:
ReplyDelete1. Indexers are known as smart array for treating an object as an array.
2. Parameterized property are called Indexer.
3. Indexers are always created with this keyword.
4. ref and out parameter are not permitted in indexers.
5. Indexer are instance method so cant be static but property can be static.
6. Indexer is identified by its signature where as a property is identified by its name.
7. Indexer are accessed using indexes where as properties are accessed by names.
8. Indexer can be overloaded.
Creating an Indexer
this [argument list]
{
get
{
// your get block code
}
set
{
// your set block code
}
}
In the above code:
can be private, public, protected or internal.
can be any valid C# types.
this
this is a special keyword in C# to indicate the object of the current class.
-------------------------
Why we use Properties?
We use properties in C#.NET to write data into datafields& to read data from data fields of a class providing.
1. To validate data before storing data into datafields.
2. Properties store data for an object, and methods are actions on object.
-------------------------
Events & Delegates
An event is a message sent by an object to signal the occurance of an action. The action could be caused by the user interaction such as a mouse click or it could be
triggered by some other program.
1. The object that raises the event is called the event sender.
2. The object that captures the event and responds to it is called the event receiver.
In event communication, the event sender class does not know which object or method will receive (handle) the events it raises. What is needed is an intermediary (or
pointer-like mechanism) between the source and the receiver. The .NET Framework defines a special type (Delegate) that provides the functionality of a function pointer.
Delegates: A delegate is a class that can hold a reference to a method. Unlike other classes, a delegate class has a signature, and it can hold references only to
methods that match its signature.
There are three steps in defining and using delegates:
Declaration
Instantiation
Invocation
http://www.akadia.com/services/dotnet_delegates_and_events.html
A very basic example (SimpleDelegate1.cs):
using System;
namespace Akadia.BasicDelegate
{
// Declaration
public delegate void SimpleDelegate();
class TestDelegate
{
public static void MyFunc()
{
Console.WriteLine("I was called by delegate ...");
}
public static void Main()
{
// Instantiation
SimpleDelegate simpleDelegate = new SimpleDelegate(MyFunc);
// Invocation
simpleDelegate();
}
}
}
Compile an test:
# csc SimpleDelegate1.cs
# SimpleDelegate1.exe
I was called by delegate ...
http://www.akadia.com/services/dotnet_delegates_and_events.html
http://www.codeproject.com/KB/cs/events.aspx
-------------------------------------------------
Singleton Pattern
http://www.dofactory.com/Patterns/PatternSingleton.aspx
//Static Constructor
ReplyDeletepublic class Test
{
public static string str = "Declaration";
static Test()
{
str = "This is Constructor!";
}
}
Static constructor will be called automatically when we create instance of above class
test obj = new test();
When we refrence any static method of class
Test.str = "xyz";
// Using private constructor to protect class from creating instance of class.
private void btnSubmit_Click(object sender, EventArgs e)
{
test obj = test.Instance();
test obj1 = test.Instance();
if (obj == obj1)
{
lblMsg.Text = "Both object are same.";
}
//test obj = new test(); This line will return error "Cannot create Instance due to protection level of class", bcz we cannot create object of test class as it has a private constructor in it.
//test obj2= new test(4); It'll not return any error and will create the instance of the class.
}
}
public class test
{
private static test _obj;
private test() // If we declare a private constructor in class then we cannot create instance of that class.
{
}
public test(int a) // But we can create instance of this class using this parameter
{
}
public static test Instance()
{
if (_obj == null)
{
_obj = new test();
}
return _obj;
}
}
-------------
ReplyDeleteCalling Same Class Constructor(Constructor chaining):
public class mySampleClass
{
public mySampleClass(): this(10) // calling below mentioned parameterized constructor from this constructor.
{
// This is the no parameter constructor method.
// First Constructor
}
public mySampleClass(int Age)
{
// This is the constructor with one parameter.
// Second Constructor
}
}
In above example we are calling mysampleclass constructor with a parameter from same class constructor.
Sequence of execution of above constructors will be as below:
1. mysampleclass(10)
2. mysampleclass()
The above way of calling the method is called initializer. We can have at the most one initializer in this way in the method.This is sometimes called Constructor chaining.
------------
Calling base class contructor:
public class a // This is base class
{
public a()
{
}
}
public class b:a // This is child class inheriting parent class
{
public b():base() // here we are calling parent constructor using base() method.
{
}
}
when we create object of class b, Its calling sequence will be as follow:
1. Class a constructor
2. class b constructor
Q. Are C# constructors inherited?
No. C# constructors cannot be inherited.
-----------
Sequence of calling constructor
public class a
{
static a()
{
}
public a()
{
}
}
public class b:a
{
static b()
{
}
public b()//:base()
{
}
public b(int a)
{
}
}
Calling sequence of above constructors will be:
if we create object of class b then
b obj=new b(5);
1. Static constructor of class b.
2. Statis constructor of class a.
3. Default constructor of class a.
4. Parameterized constructor of class b.
----------------------------
Constructors FAQs
Is the constructor mandatory for a class?
Yes, it is mandatory to have the constructor in the class and that too should be accessible for the object i.e., it should have a proper access modifier. Say, for example, we have only private constructor(s) in the class and if we are interested in instantiating the class, i.e., want to create an object of the class, then having only private constructor will not be sufficient and in fact it will raise an error. So, proper access modifies should be provided to the constructors.
What if I do not write the constructor?
In such case, the compiler will try to supply the no parameter constructor for your class, behind the scene. Compiler will attempt this only if you do not write the constructor for the class. If you provide any constructor (with or without parameters), then compiler will not make any such attempt.
What if I have the constructor public myDerivedClass(), but not the public myBaseClass()?
It will raise an error. If either the no parameter constructor is absent or it is in-accessible (say it is private), it will raise an error. You will have to take the precaution here.
Can we access static members from the non-static (normal) constructors?
Yes, we can. There is no such restriction on non-static constructors. But there is one on static constructors that it can access only static members.
Refrence Links;
http://www.codeproject.com/KB/dotnet/ConstructorsInCSharp.aspx
-----------------------------------------------------------------------------------------------------
Design patterns in .Net
http://www.dofactory.com/Patterns/Patterns.aspx
---------LINQ -------------
ReplyDeleteDelegates in 1.1
///
/// Declaring a Class with Sum Method
///
public class clsDelegate
{
public int Sum(int a, int b)
{
return a + b;
}
}
// Delegate Declaration
public delegate int SumDelegate(int x,int y);
private void btnSubmit_Click(object sender, EventArgs e)
{
// Delegate Initialization
SumDelegate obj = new SumDelegate(new clsDelegate().Sum);
// Invoking Delegate
MessageBox.Show("Sum: " + obj(2 ,3).ToString());
}
Delegates in 2.0
#region Delegates in 2.0
public delegate int AddDelegate(int a, int y);
private void btnSubmit1_Click(object sender, EventArgs e)
{
AddDelegate obj= delegate(int x,int y) {return x + y;};
MessageBox.Show(obj(5,7).ToString());
}
#endregion
Anonymous Method
Below is an exapmle of using an anonymous method.
public delegate int ChangeInt(int x);
ChangeInt myDelegate = new ChangeInt(
delegate(int x)
{
return x * 2;
}
);
Understainding Lambda Expression:
ReplyDeleteIt is a simplest form for writing an anonymous method:
ChangeInt myDelegate = x => x * 2;
In case we have more than 1 parameter:
If you have a delegate that takes two arguments:
// Defines a delegate that takes two ints and returns an int
public delegate int MultiplyInts(int arg, int arg2);
You can declare and initialize a delegate:
MultiplyInts myDelegate = (a, b) => a * b;
In case delegate return type is void,but have a parameter then Lambda expression will be:
// Defines a delegate that takes a string and returns void
public delegate void OutputToConsole(string arg);
static void Main(string[] args)
{
OutputToConsole o = a => {
Console.WriteLine(a);
};
o("Hello, World");
}
In case delegate have returns void and takes no arguments, it results in interesting syntax:
// Defines a delegate that takes no arguments and returns void
public delegate void OutputHelloToConsole();
static void Main(string[] args)
{
OutputHelloToConsole o = () =>
{
Console.WriteLine("Hello, World");
};
o();
}
Refrence site:
ReplyDeletehttp://blogs.msdn.com/b/ericwhite/archive/2006/10/03/lambda-expressions.aspx
http://geekswithblogs.net/dotnetnomad/archive/2008/01/29/119037.aspx
http://www.codeproject.com/KB/dotnet/LINQ.aspx
Extension Method
ReplyDeleteAnother new concept that comes with .NET 3.5 is the Extension methods. Now we can include our own custom methods in
already defined objects. We can create static classes and include custom methods to objects. Extension method
behavior is similar to that of static methods. You can declare them only in static classes. To declare an extension
method, you specify the keyword this as the first parameter of the method. Let us look at the following example:
public static class ExtensionMethods
{
public static int ToInt32Extension(this string s)
{
return Int32.Parse(s);
}
}
If we include the above class namespace to our application, any string variable will have ToInt32Extension method.
This function takes 0 arguments and passes the string to s. We can also pass parameters just like below:
public static class ExtensionMethods
{
public static int ToInt32ExtensionAddInteger(this string s,int value)
{
return Int32.Parse(s) + value;
}
}
Here integer value is also passed.
string s = "10";
s.ToInt32Extension(); it'll return int data as declared above in function.
Annonymous Type
Annonymous types introduced with .NET can create object without even declaring the classes. The members of the
annonymous types are implicitely defined during compilation
var x = new { Name ="AA", Age =30, ... };
This would create a new object of annonymous type.
when we check it like x. then it'll list proerties listed above in x.
Meaning of VAR
Var is a new keyword added in .NET 3.5. This is called Implicit Type Variable. During runtime it automatically
assigns its type of the variable based on the object if finds.
var x = 10 // implies the variable is of integer type
var x = new list(); // Means x holds list of employees
var is very useful when working with annonymous typed just introduced. It assigns the type of the variable based on
the type of the object passed in, so there is no difference of doing List() x = new List() and
doing var x = new List() as in both the case the type of the variable x is always get to List.
Only restriction is we cannot define members of var type.
----------- LINQ END ---------
http://stevenharman.net/blog/archive/2006/05/13/Custom_Output_Caching_in_ASP.NET.aspx
ReplyDelete