C# ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT WPF
C# OOPS HTML&CSS DHTML ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT MVVM WPF SQL SERVER Photoshop Dreamweaver Flash Illustrator
Blog Archive
-
2012
(83)
- September(2)
-
August(81)
- Important WPF Classes and Namespaces
- Applications of WPF
- Programming With WPF
- Limitations of Silverlight and flash
- Silverlight Feature comparison with Flash Features
- How to Add XML File in Your Silverlight Project
- 3 Pixel Shader Effects in Silverlight
- Rotate Image in 3D direction using Silverlight
- First Application of Silverlight
- Silverlight 2.0
- How Install Ajax?
- Ajax Advantage
- JavaScript Loops
- Show a Military Clock and ordinary clock
- How To validate a Form in ASP. Net
- How to show Day of Week
- How to Swap a Image using JavaScript
- Special Character in JavaScript
- Prompt Box in JavaScript
- The use of data adapter.?
- The steps involved to fill a dataset?
- Dataset object in ADO .NET
- Handling Connection Events
- The SQLCONNECTION OBJECT
- Command Constructors
- The SQLCOMMAND OBJECT
- Gridview in ASP.NET
- Introduction Of Master Page
- Server Side State Management
- Query String In ASP.NET
- Cookies in ASP.NET
- State Management in ASP.NET
- Various types of application that we can develop i...
- Properties
- Inheritance ,Polymorphism
- Array,Indexer and Collections
- Control Statements
- Operators, types and variables in C#
- Fundamental of C#
- C# & other Programming Languages
- The WPF Designer
- C# DataTypes
- What is Ajax?
- Silverlight 1.0
- Confirm Box in JavaScript
- Component classes
- Life Cycle of ASP.NET
- The Basics of JQuery
- Jquery Blog Content
- Birth Of WPF
- .Net Frameworks Architecture
- History Of Ajax
- Why Silverlight?
- How to access a URL of parent page in ASP. net
- THE ADO.NET Architecture?
- Architecture of ASP.NET
- Introduction Of Ajax
- Ajax Blog Content
- Introduction of SilverLight
- Silverlight Blog Content
- Introduction to Javascript Blog
- Javascript Blog Content
- Introduction to Ado.Net blog
- Ado.Net Blog Content
- Introduction to C# Blog
- C# Blog Content
- Introduction to Asp.Net
- Asp.Net Blog Content
- Introduction to WPF
- WPF Blog Content
- WPF Interview Question
- Silverlight Interview Question
- Ajax Interview Question
- JQuery Interview Question
- Javascript Interview Question
- DHTML Interview Question
- Ado.Net Inetview Questions
- SQL Interview Questions
- HTML&CSS Interview Questions
- Asp.Net Interview Qusetions
- C# Interview Questions
Array,Indexer and Collections
Array
An array is the collection of similar type of
objects. Array in C# is different for the array of C++ and other languages
because they are
objects. This provides them useful methods and property. Arrays allow a group of
elements of a particular type to be stored
in a contiguous block of memory. Array types derive from System.Array and are
declared in C# using brackets ([]).
Syntax- datatype [] array-name;
e.g.- int [] age;
The square brackets ([]) tell the C# compiler that you are
declaring an array, and the type specifies the type of the elements it will
contain. In the previous example, age is an array of integers. Instantiate an
array using the new keyword. For example:
age = new int[5]; This declaration sets aside memory for an array holding five
integers.
Multidimensional Array:
Multidimensional Arrays of two types Rectangular Array and Jagged Array
Rectangular Array represents n-dimensional blocks.
e.g.- int [ , ,] age = new
int[17,20,34];
Jagged Arrays are arrays of arrays.
int [][][] books = new int [3][][];
for (int i = 0; i < 3; i++)
{
books[i] = new int [4][];
for (int j = 0; j < 4; j++)
books[i][j] = new int [5];
}
// assign an element
books1 [1,1,1] = books [1][1][1] = 7;
|
Indexer: Indexers are usually known as
smart array in C#.It is used for treating object as an array.Defining an
indexer in C# is much like same as
defining properties. Or we can say that an indexer is a
member that enables an object to be indexed in the same way as an array.
Syntax-
<access modifier> <return type> this [argument list]
{
get
{
// Write here some code for Get
}
set
{
// Write here some code for Get
}
}
Collections:
Collections are the enumerable data
structure in C# that can be assessed using indexes or keys. Types of collections
in C# are given below-
System.Collections namespace
This provides a lot of classes, methods and properties to interact with
the varying data structures that are supported by it. The interfaces
that are defined in this namespace include:
- IEnumerable
- IEnumerator
- ICollection
- IList
- IDictionary
System.Collections.Stack
System.Collections.Queue Both are derived from ICollection Interface.
The collections that inherit the IDictionary interface include:
System.Collections.SortedList System.Collections.Hashtable
The IList interface represents collections that only have value. The following are the classes that extend this interface.
System.Array - System.Collections.ArrayList
- System.Collections.Specialized.StringCollection
Concrete Collection Classes:
ArrayList class- This works by
maintaining an internal array of objects that is replaced with a larger array
when it reaches its capacity of elements.
BitArray class- It is a dynamically
sized array of Boolean values. It is more memory-efficient than a simple
array of bools because it uses only one bit for each value.
Hashtable class- A Hashtable is a
standard dictionary (key/value) data structure that uses a hashing
algorithm to store and index values efficiently.
Queue class- A Queue is a standard
first-in, first-out (FIFO) data structure, providing simple operations to
enqueue, dequeue, peek, etc.
SortedList class-A SortedList is a
standard dictionary data structure that uses a binary-chop search to index
efficiently.
Stack class- A Stack is a standard
last-in first-out (LIFO) data structure.
StringCollection class- A
StringCollection is a standard collection data structure for storing strings.









