Friday, May 29, 2015

ADO.NET With C Sharp (Index)

ADO.NET With C# Course Structure

ADO.NET Basics



  • Connection, DataAdapter and DataSet
  • SqlConnection vs. OleDbConnection
  • Connection Pooling
  • Transaction within a Database
  • Create an Assembly with Strong Name
  • Storing Binary Data in SQL Server Database

ADO DATA OBJECTS


  • DataReader
  • Accessing a Cell in a DataRow
  • Different Versions of Cell Data
  • DataRow.IsNull
  • Expression Column
  • DataView
  • Filtering DataRows with Enumeration DataViewRowState
  • HasErrors Method of a DataSet & DataRow
  • Creating a New DataRow
  • Finding a DataRow by Primary Key

DATA BINDING


  • Binding a Property of a Control to a DataTable Column
  • CurrencyManager
  • Binding Data Source to Controls on a Child Form
  • ListControl’s Data Binding
  • Customizing Data Flow between the Control and its Data Source

Dataset Schema

  • By default , minimum schema is filled into dataset by DataAdapter.Fill
  • How to Create a Dataset with Schema
  • ForeignKeyConstraint vs. DataRelation
  • Turning Off Contraints before Fill
  • Navigating Between Tables with DataRelations
  • Do Not Join Database Tables in DataSet
  • Schema Table
  • Mapping Table Names in DataAdapter.Fill
  • Mapping column names in DataAdapter.Fill
  • Strongly Typed DataSet
  • Challenges Brought By Using Strongly Typed DataSet
  • How are Column Constraints Represented in Strongly Typed DataSet

UPDATING DATABASE


  • RowState, AcceptChanges and RejectChanges
  • Submitting Changes with Ad hoc Queries or Stored Procedures
  • Accommadating NULL Values When Updating
  • Concurrency Control with Time Stamp
  • Refreshing DataSet After Submitting Changes
  • Retrieving Auto-generated Identity (SQL Server)
  • SET NOCOUNT ON/OFF
  • DataSet.Merge
  • When there is a Separate Data Access Tier
  • Oracle's sequence object – Counterpart of SQL auto-increment
  • Solving Concurrency Conflict
  • Transaction Management

ADO.NET & XML

  • DataSet’s Support of XML
  • XmlReader
  • XmlDocument & XmlNode
  • XmlDataDocument
  • XPath
  • XmlReader & SQL Server 2000’s Support on XML
  • SQL XML .NET Data Provider

DATA BINDING

  • Binding a Property of a Control to a DataTable Column
  • CurrencyManager
  • Binding Data Source to Controls on a Child Form
  • ListControl’s Data Binding
  • Customizing Data Flow between the Control and its Data Source

News 30 May 2015

Sunday, May 17, 2015

News 18 May 2015

ASP.NET With C Sharp (Index)

ASP.NET Interview Question

ASP.NET Interview Questions


1. When using an implicitly typed array, which of the following is most appropriate? 

a. All elements in the initializer list must be of the same type.
b. All elements in the initializer list must be implicitly convertible to a known type which is the actual type of at least one member in the initializer list.
c. All elements in the initializer list must be implicitly convertible to common type which is a base type of the items actually in the list.
Answer: C


2. The output generated by the following code will be:
String t = @”This\Is\a\Test”;
Response.Write(t);

a. ThisIsaTest
b. This\Is\a\Test
c. It will give a compilation error: Unrecognized escape sequence.
Answer: B 


3. Which of the following is/are true regarding validation in an ASP.NET application
 

a. Server validation can be used alongside with client side validation.
b. All data posted on Server, should be validated.
c. Client Side validation typically provides a faster response (feedback) time than server validation.
Answer: C 


4. Which of the following are true about System.Security.Cryptography under version 3.5 of the framework?
 

a. Support is provided for the ‘Suite B’ set of cryptographic algorithms as specified by the National Security Agency (NSA).
b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
c. The System.Security.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rjindael based encryptio
Answer: B 


5. The rights to which Windows Account does anonymous Web Site access use by default?
 

a. Administrator
b. IUSER_MachineName (where the MachineName is the actual computer name)
c. ASPNET
d. Guest
Answer: B 


6. Which of the following statements do Expression Trees fit best?
 

a. Expression trees are a data structure which can be initially composed using language syntax.
b. Expression trees are a dynamically generated code which is executed to perform the desired function.
c. Expression trees can be modified once they are created.
Answer: A 


7. Which of the following are true about Extension methods?
 

a. They must be declared static
b. They can be declared either static or instance members
c. They must be declares in the same assembly(but may be in different sources files)
d. Extension methods can be used to override existing instance methods
e. Extension methods with the same signature for the same class may be declared in multiple namespace without causing compilation errors
Answer: A,C


8. With which class is the task of mapping a specific point in time into units such as weeks, months, and years accoumplished?
 

a. System.Globalization.CultureInfo
b. System.Globalization.Calendar
c. System.DateTime
Answer: A


9. Which of the following are true regarding System.Web.Mail and System.Net.Mail namespaces?
 

a. System.Web.Mail is not supported under version 3.5 of the Framework
b. System.Web.Mail is deprecated under version 3.5 of the Framwork, and it is officially recommended that System.Net.Mail be used.
c. System.Web.Mail is the preferred solution when using IIS hosted applications
d. There are no functional differences; the items were moved to a new namespace to better reflect their applicability.
Answer: B


10. Which of the following is true about Extension methods.
 

a. They can be declared either static or instance members.
b. They must be declared in the same assembly (but may be in different source files)
c. Extension methods can be used to override existing instance methods
d. Extension methods with the same signature for the same class may be declared in multiple namespaces without causing compilation errors.
Answer: A


11. When using Cascading Style Sheets (CSS) to format output, which of the following is/are true?
 

a. Styles can be applied to all elements having the same CSS Class attribute.
b. Styles can be applied to specific elements based on their ID attribute.
c. Styles can be applied to elements based on their position in a hierarchy.
d. Styles can be used to invoke script based code.
e. All of the above
Answer: A


12. Which of the following events should be used for assigning a Theme dynamically to a page?
 

a. PreInit
b. Init
c. PreLoad
d. PreRender
e. Render
Answer: A

13. Which of the following are true about Nullable types? 
a. A Nullable type is a reference type.
b. An implicit conversion exists from any non-nullable value type to a nullable form of that type.
c. A predefined conversion from the nullable type S? to the nullable T? exists if there a predefined conversion from the non-nullable type T
Answer: B,C


14. Given the code below, which items will cause a compilation error?
static void F1(params int[] y)
{
}
static void Sample()
{
int[] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}

a. F1(j)
b. F1(k)
c. F1(1,2,3)
d. F1(NEW [] {1,2,3})
e. None of the above
Answer: E

15. Which of the following types guarantee atomic reads and writes? 

a. int
b. double
c. long
d. float
Answer: A,D


16. In order to enable AJAX Functionality, which control is place on the page?
 

a. asp:ScriptManager
b. asp:AjaxManager
c. asp:PageManager
d. asp:ClientScriptManager
Answer: A


17. Determining the availablity of sufficient memory for an operation can be accompished by
 

a. There is no supported application level means to determine if a specfic amount of memory is available
b. Using static methods of system.runtime.memoryfailpoint and checking the return value
c. Creating an instance of system.runtime.memoryfailpoint and monitoring for an insuffcientMemoryException
d. Creating an instance of system.runtime.memoryfailpoint and monitoring for an outofmemoryException
Answer: C


18. In which file are Predefined Client Side Validation Scripts defined?

a. WebUIValidation.js
b. ClientValidation.js
c. AspNetValidation.js
d. UserValidation.js
Answer: A 


19. When using an automatic property, which of the following statements is true?
 

a. The compiler generates a backing field that is completely inaccessible from the application code.
b. The compiler generates a backing field that is accessible via reflection.
c. The compiler generates a code that will store the information separately from the instance to ensure its security.
Answer: A

20. When using asynchronous partial updates with an UpdatePanel, which of the following are true? 

a. Only the UpdatePanel and any child controls go through the server lifecycle.
b. The entire page always goes through the entire lifecycle.
c. Only the UpdatePanel which initiated the Postback and its child controls can provide updated information.
d. UpdatePanels cannot be used with Master Pages.
Answer: A

21. Which of the following attributes of the ProcessModel element of the Machine.Config file, is used to specify the level of authentication for DCOM security? 

a. comAuthenticationLevel
b. comImpersonationLevel
c. maxloThreads
d. requestQueueLimit
Answer: A


22. Which of the following is/are true regarding the use of Authentication to controls access to the HTML file (.htm or .html)?
 

a. ASP.NET authentication handles these by default in a manner equivalent to .aspx pages.
b. ASP.NET authentication can be associated with these extensions using aspnet_isapi.dll in IIS 6.0, for the appropriate directory.
c. ASP.NET authentication cannot be used for this purpose.
Answer: B 


23. By which of the following can the .NET class methods be included in .aspx files?
 a. Including .NET code within the script element with the runat attribute set to server
b. Including .NET code within the code element
c. Including .NET code using the @code directive on the page
d. Including .NET code within the execute attribute of the individual control
Answer: A


24. Where should information about a control created at design time be stored?
 

a. ApplicationState
b. SessionState
c. ViewState
d. None of the above
Answer: C 


25. Which of the following can be used to control caching within an ASP.NET application?
 

a. Using the @OutputCache in the .aspx file
b. Setting the HttpCachePolicy of the Cache property inside the Response object.
c. Using the Cache property of the Page Object
d. All of the above
Answer: D

 26. Which of the following are true using ADO.NET DataSets and DataTables?

a. The DataSets and DataTables objects requires continuous connection to the database
b. All tables a dataset must come from the same database
c. A given instance of a DataTable can be in only one DataSet
d. Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes.
Answer: D 


27. When Windows Communication Foundation is used to develop a Web Service, which of the following are supported?
 

a. WS-Address
b. WS-MetadataExchange
c. WS-Security
d. WS-Atomic Transaction
e. All of the above
Answer: E 


29. The earliest event in which all viewstate information has been restored is:

a. Init
b. PreLoad
c. Load
d. Render
Answer: A 


30. Which of the following items are recommended when using XML comments to generate documentation?

a. <exception>
b. <code>
c. <summary>
d. All of the above
Answer: D 


31. Which of the following conditions can trigger the automatic recycling of an ASP.NET applications hosted in IIS?

a. A specific number of requests to the application process
b. A percentage of physical memory utilized by the process
c. A specific time interval
d. All of the above
Answer: C 


32. Which of the following is not an unboxing conversion?

a. void func1(object o)
{
int i = (int)o;
}

b. void func1(ValueType v)
{
int i = (int)v;
}

c. enum En {e1, e2}
void func1(System.Enum et)
{
En e = (En) et;
}

d. interface I {int Value {get; set;}}
void func1(I vt)
{
int i = vt.Value;
}

e. class C { public int Value {get; set;}}
void func1(C vt)
{
int i = vt.Value;
}
Answer: D

33. Which of the following are required to be true by objects which are going to be used as key in a system.collection.hashtable? 

a. They must handle case –sensitive identically in both the Gethashcode() and equals() method
b. key objects must be immutable for the duration they are used with hash table
c. getHashCode() must be overridden to provide the same result given the same parameters ,regardless of reference equality unless the Hash table constructor is provided with an IEqualityComparer parameter
d. Each element in hash table is stored as a keyvalue pair of the type system. Collection .dictionary element
e. All of the above
Answer: E

34. The following are two statements related to System.DateTimeOffset namespace.
Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not support arithmetical operations
 

a. Statement X is incorrect and Statement Y is correct
b. Statement X is correct and Statement Y is incorrect
c. Both Statements X,Y are correct
d. Both Statements X,Y are incorrect
Answer: B 

35. Which of the following is false regarding System.Threading.ReaderWriterLockSlim? 
a. It is optimized for single processor/core operations
b. A thread which has a read lock on a resource may not acquire a write lock on the same resource.
c. By default, a thread which has a read lock on a resource and attempts to get another read lock on the same resource will throw an exception
Answer: C 


36. The following are the two statements regarding the DataRow from the DataRowCollection of a DataTable
Statement X: Use the DataRowCollection.Remove method to immediately delete the row.
Statemnt Y: Use the DataRow.Delete method to mark the row for deletion when DataRow.AcceptChanges is called.
 

a. Statement X is incorrect and Statement Y is correct
b. Statement X is correct and Statement Y is incorrect
c. Both Statements X,Y are correct
d. Both Statements X,Y are incorrect
Answer: C 

37. Which of the following is true about C# generics?
a. C# allows non-type template parameters
b. C# supports explicit specialization
c. C# allows the type parameter to be used as the base class for the generic type.
d. C# enforces that all codes are valid for all types of parameters.
Answer: D 

38. Which of the following accurately describes the class structure when implementing an Asp.Net page which used the codefile attribute?
a. The actual instantiated class is the class defined in the codefile.
b. The actual instantiated class is dynamically created and has a base class defined in the codefile.
c. The actual instantiated class is dynamically created and has a member representing the class defined in the codefile.
d. The actual instantiated class is dynamically creates and is a co-class of the class defined in the CodeFile.
Answer: D 

39. Which of the following are included in the advantages of Lambda Expressions over Anonymous methods?
a.More concise syntax.
b.The types for a Lambda Excpression may be omitted.
c.The body of an Anonymous method can not be an expression.
d.Lambda Expressions permit deferred type inference that anonymous methods do not
e.All of the above.
Answer: A 

40. Which of the following statements is false about Passport Authentication?
a. The Passport SDK must be installed.
b.Passport authentication requires a network path between the Client and the Microsoft Passport Server
c.Passport Authentication provides persistent authentication across sessions
Answer: B

C# Interview Questions

C# Interview Questions


1. The global assembly cache: 
a. Can store two dll files with the same name
b. Can store two dll files with the same name, but different version
c. Can store two dll files with the same name and same version
d. Can not store dll files with the same name
Answer: B

2. Which of the following is capable of returning multiple rows and multiple columns from the database?
a. ExecuteReader
b. ExecuteXmlReader
c. DataAdapter
d. All of the above
Answer: D 

3. Which of the following keywords prevents a class from being overridden further
a. Abstract
b. Sealed
c. Final
d. Root
e. Internal
Answer: B 

4. Which of the following is true about friend functions in C#
a. Friend functions violate the concept of OOPS
b. Friend functions should not be used
c. Friend functions enhance the concept of OOPS if used properly
d. Friends functions are not available in C#
Answer: D 

5. How can an abstract function be declared
a. By equating it to 1
b. By equating it to zero
c. By using the virtual keyword
d. By using the abstract keyword
Answer: D 

6. Which type of class members are associated with the class itself rather than the objects of the class?
a. Public
b. Protected
c. Private
d. Static
Answer: D 

7. C# has a keyword called ‘int’. Which .NET type does this map to?
a. System.Int16
b. System.Int32
c. System.Int64
d. System.int128
Answer: B 

8. Which of the following statements are true?
An abstract function
a. Is a function that takes no arguments
b. Can be defined in a class only if the class itself is also marked as abstract
c. Must be overridden in a derived class
d. Can be overridden in a derived class
Answer: A,C 

9. What is encapsulation?
a. Wrapping functions into a single unit
b. Wrapping functions and data into a single unit
c. Making the whole data accessible to the outer world
d. Making the whole data and functions accessible to the outer world
Answer: B 

10. How can you define a function in a derivced class having the same name as a non-virtual function in the base class?
a. You can do this simply by adding the function definition in the derived class. The function in the derived class will automatically hide the function in the parent class
b. By using the new keyword
c. By using the override keyword
d. You cannot do this, the base and derived classes cannot have non-virtual functions with the same name.
Answer: A 

11. ______________ namespace is not defined in the .NET class library.
a. System
b. System.CodeDom
c. System.IO
d. System.Thread
e. System.Text
Answer: E 

12. Asynchronous execution is supported in ADO.NET 2.0 for
a. ExecuteReader
b. ExecuteScalar
c. ExecuteNonQuery
d. All of the above
Answer: D 

13. Which of the following are not C# value types?
a. Long
b. Bool
c. Struct
d. Class
e. String
Answer: D,E 

14. Where does a C# assembly store the information regarding the other external dependencies, such as satellite assemblies, global assemblies etc, and their versions so that they can be loaded correctly when the assembly is executed?
a. In the embedded resources of the assembly
b. In the manifest of the assembly
c. In the MSIL of the assembly
d. In windows registry database
e. None of the above
Answer: B 

15. What is wrong with the code give below:
class CChkeck
{
public static void Main()
{
int nLen = 5;
int[] arrNum = new int[nLen];
}
}
a. The squre brackets[] should be with arrNum instead of int
b. You cannot use a variable to set the size of the array
c. int[] should be replaced with int()
d. nothing is wrong with the code. It will compile without errors.
Answer: D 

16. Which of the following is not a feature of .NET 2.0?
a. Partial classes
b. Generics
c. Multiple inheritance
d. Partial methods
Answer: C 

17. Which object oriented concept is related to the derivation of a class based on another class?
a. Encapsulation
b. Polymorphism
c. Data Hiding
d. Inheritance
e. Overloading
Answer: D 

18. Which of the following types of cursors are available with ADO.NET DataReader object?
a. Server-side, forward-only, and read-write cursor
b. Server-side, forward-only, and read-only cursor
c. Server-side, backward-only, and read-write cursor
d. Server-side, bidirectional, and read-only cursor
Answer: B 

19. Which of the following statements is correct with regard to .NET framework managed web pages?
a. They interact directly with the runtime
b. They do not execute in the native code language
c. They are interpreted and scripted
d. All of the above
Answer: D

Managed And Unmanaged Code In .NET

Managed Code In .NET

.NET supports two kind of coding
  • Managed Code
  • Unmanaged Code

Managed Code

The resource, which is with in your application domain is, managed code. The resources that are within domain are faster.
The code, which is developed in .NET framework, is known as managed code. This code is directly executed by CLR with help of managed code execution. Any language that is written in .NET Framework is managed code.

Managed code uses CLR which in turns looks after your applications by managing memory, handling security, allowing cross - language debugging, and so on.

Unmanaged Code

The code, which is developed outside .NET, Framework is known as unmanaged code. Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such as C++ can be used to write such applications, which, for example, access low - level functions of the operating system. Background compatibility with code of VB, ASP and COM are examples of unmanaged code.
Unmanaged code can be unmanaged source code and unmanaged compile code. Unmanaged code is executed with help of wrapper classes.

Wrapper classes are of two types:
  • CCW (COM Callable Wrapper)
  • RCW (Runtime Callable Wrapper)


CLR In .NET



CLR In .NET

The Common Language Runtime (CLR) is an Execution Environment . It works as a layer between Operating Systems and the applications written in .Net languages that conforms to the Common Language Specification (CLS). The main function of Common Language Runtime (CLR) is to convert the Managed Code into native code and then execute the Program. The Managed Code compiled only when it needed, that is it converts the appropriate instructions when each function is called . The Common Language Runtime (CLR) 's Just In Time (JIT) compilation converts Intermediate Language (MSIL) to native code on demand at application run time.

During the execution of the program ,the Common Language Runtime (CLR) manages memory, Thread execution, Garbage Collection (GC) , Exception Handling, Common Type System (CTS), code safety verifications, and other system services. The CLR ( Common Language Runtime ) defines the Common Type System (CTS), which is a standard type system used by all .Net languages . That means all .NET programming languages uses the same representation for common Data Types , so Common Language Runtime (CLR) is a language-independent runtime environment . The Common Language Runtime (CLR) environment is also referred to as a managed environment, because during the execution of a program it also controls the interaction with the Operating System. In the coming section you can see what are the main functions of Common Language Runtime (CLR).



Compiling To MSIL

Compiling To MSIL

When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Before code can be run, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler.

When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including the definition of each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published Microsoft PE and common object file format (COFF) used historically for executable content. This file format, which accommodates MSIL or native code as well as metadata, enables the operating system to recognize common language runtime images. The presence of metadata in the file along with the MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during execution.

News 17 May 2015

Saturday, May 16, 2015

Features of .NET

.NET Features

Some of the basic features of .NET are as follows.

Rich Functionality

.NET framework provides a rich set of functionality. It contains hundreds of classes that provide variety of functionality ready to use in the applications. This means that as a developer you need not go into low level details of many operations such as file IO, network communication and so on.

Easy development of web applications

ASP.NET is a technology available on .NET platform for developing dynamic and data driven web applications. ASP.NET provides an event driven programming model (similar to Visual Basic 6 that simplify development of web pages (now called as web forms) with complex user interface. ASP.NET server controls provide advanced user interface elements (like calendar and grids) that save lot of coding from programmer’s side.

OOPs Support

The advantages of Object Oriented programming are well known. .NET provides a fully object oriented environment. The philosophy of .NET is – “Object is mother of all.” Languages like Visual Basic.NET now support many of the OO features that were lacking traditionally. Even primitive types like integer and characters can be treated as objects – something not available even in OO languages like C++.

Multi-Language Support

.NET supports multiple languages. The beauty of multi language support lies in the fact that even though the syntax of each language is different, the basic capabilities of each language remain at par with one another.

Multi-Device Support

Modern lift style is increasingly embracing mobile and wireless devices such as PDAs, mobiles and handheld PCs. . . .NET provides promising platform for programming such devices. .NET Compact Framework and Mobile Internet Toolkit are step ahead in this direction.

Automatic memory management

While developing applications developers had to develop an eye on system resources like memory. Memory leaks were major reason in failure of applications. .NET takes this worry away from developer by handling memory on its own. The garbage collector takes care of freeing unused objects at appropriate intervals.

Compatibility with COM and COM+

Before the introduction of .NET, COM was the de-facto standard for componentized software development. Companies have invested lot of money and efforts in developing COM components and controls. The good news is – you can still use COM components and ActiveX controls under .NET. This allows you to use your existing investment in .NET applications. .NET still relies on COM+ for features like transaction management and object pooling. In fact it provides enhanced declarative support for configuring COM+ application right from your source code. Your COM+ knowledge still remains as a valuable asset.

No more DLL Hell

DLL conflicts are a common fact in COM world. The main reason behind this was the philosophy of COM – “one version of component across machine”. Also, COM components require registration in the system registry. .NET ends this DLL hell by allowing applications to use their own copy of dependent DLLs. Also, .NET components do not require any kind of registration in system registry.

Strong XML support

XML has gained such a strong industry support that almost all the vendors have released some kind of upgrades or patches to their existing software to make it “XML compatible”. Currently, .NET is the only platform that has built with XML right into the core framework. .NET tries to harness power of XML in every possible way. In addition to providing support for manipulating and transforming XML documents, .NET provides XML web services that are based on standards like HTTP, XML and SOAP.

Ease of deployment and configuration

Deploying windows applications especially that used COM components were always been a tedious task. Since .NET does not require any registration as such, much of the deployment is simplified. This makes XCOPY deployment viable. Configuration is another area where .NET – especially ASP.NET – shines over traditional languages. The configuration is done via special files having special XML vocabulary. Since, most of the configuration is done via configuration files, there is no need to sit in front of actual machine and configure the application manually. This is more important for web applications; simply FTPing new configuration file makes necessary changes.

Security

Windows platform was always criticized for poor security mechanisms. Microsoft has taken great efforts to make .NET platform safe and secure for enterprise applications. Features such as type safety, code access security and role based authentication make overall application more robust and secure.

Functions Of .NET

Functionality In .NET

.NET is not a single technology. It is a set of technologies that work together seamlessly to solve business problems. Now we will discuss various functionalities and tools of .NET and the kind of applications you can develop.

Applications that can be developed in .NET

  • ASP.NET Web applications: These include dynamic and data driven browser based applications.
  • Windows Form based applications: These refer to traditional rich client applications.
  • Console applications: These refer to traditional DOS kind of applications like batch scripts.
  • Component Libraries: This refers to components that typically encapsulate some business logic.
  • Windows Custom Controls: As with traditional ActiveX controls, you can develop your own windows controls.
  • Web Custom Controls: The concept of custom controls can be extended to web applications allowing code reuse and modularization.
  • Web services: They are “web callable” functionality available via industry standards like HTTP, XML and SOAP.
  • Windows Services: They refer to applications that run as services in the background. They can be configured to start automatically when the system boots up.

.NET Framework SDK

You can develop such varied types of applications. .NET has a complete Software Development Kit (SDK) - more commonly referred to as .NET Framework SDK - that provides classes, interfaces and language compilers necessary to program for .NET. Additionally it contains excellent documentation and Quick Start tutorials that help you learn .NET technologies with ease. .NET Framework SDK is available FREE of cost.

Development Tools

If you are developing applications that require speedy delivery to your customers and features like integration with some version control software then simple Notepad may not serve your purpose. In such cases you require some Integrated Development Environment (IDE) that allows for Rapid Action Development (RAD). The new Visual Studio.NET is such an IDE. VS.NET is a powerful and flexible IDE that makes developing .NET applications a breeze. Some of the features of VS.NET that make you more productive are:
  • Drag and Drop design
  • IntelliSense features
  • Syntax highlighting and auto-syntax checking
  • Excellent debugging tools
  • Integration with version control software such as Visual Source Safe (VSS)
  • Easy project management
Note that when you install Visual Studio.NET, .NET Framework is automatically installed on the machine.

Visual Studio.NET Editions

Visual Studio.NET comes in different editions. You can select edition appropriate for the kind of development you are doing. Following editions of VS.NET are available:
  • Professional
  • Enterprise Developer
  • Enterprise Architect
Visual Studio .NET Professional edition offers a development tool for creating various types of applications mentioned previously. Developers can use Professional edition to build Internet and Develop applications quickly and create solutions that span any device and integrate with any platform. Visual Studio .NET Enterprise Developer (VSED) edition contains all the features of Professional edition plus has additional capabilities for enterprise development. The features include things such as a collaborative team development, Third party tool integration for building XML Web services and built-in project templates with architectural guidelines and spanning comprehensive project life-cycle.

Visual Studio .NET Enterprise Architect (VSEA) edition contains all the features of Visual Studio .NET Enterprise Developer edition and additionally includes capabilities for designing, specifying, and communicating application architecture and functionality. The additional features include Visual designer for XML Web services, Unified Modeling Language (UML) support and enterprise templates for development guidelines and policies.

In addition to these editions, special language specific editions are available. They are:

  • Visual Basic.NET Standard Edition
  • Visual C# Standard Edition
  • Visual C++ .NET Standard (soon to be released)
These editions are primarily for hobbyist, student, or beginner who wants to try their hands on basic language features.

.NET Redistributable

In order to run application developed using .NET Framework the machine must have certain ‘runtime’ files installed. They are collectively called as .NET redistributable. .NET redistributable provides one redistributable installer that contains the common language runtime and Microsoft .NET Framework components that are necessary to run .NET Framework applications. The redistributable is available as a stand-alone executable and can be installed manually or as a part of your application setup.

If you have installed .NET Framework SDK, there is no need of installing redistributable separately. Also, note that there is difference between .NET Framework SDK and .NET redistributable in terms of purpose and tools and documentation supplied. .NET Framework SDK is intended to ‘develop’ applications where as .NET redistributable is intended to ‘run’ .NET applications.


.NET and mobile development

Now days the use of mobile and wireless devices is ever increasing. PDAs, mobile phones, Smartphones, handheld PCs and HTML pagers are becoming common. As compared to full blown desktop computers, Mobile devices are generally resource-constrained. There are limitations on what they can display and in which form. For example you can easily display graphical menus in desktop applications but the same may not be possible for cell phones. Today there are many vendors making CPUs and development tools for mobile devices. However, their standards are much varying. For example devices running Windows CE will have different tools and standards of development than Palm OS. Also, programming model for such devices is an issue of debate. For example, Wireless Application Protocol (WAP) was considered a ‘standard’ for mobile devices but it introduced disadvantages of its own such as requirement of continuous connectivity, lack in rich user interface and failure to utilize client – side resources effectively.
Mobile devices can be broadly divided into two categories:

  • Mobile Devices that have certain client-side resources like PDAs, Smartphones and Handheld PCs. They can run stand-alone application with rich user interface.
  • Mobile Devices that lack even these client-side resources such as mobile phones. They can not run stand alone applications having rich and more interactive user interface. In order to encompass all possible devices from above categories Microsoft has developed two distinct technologies namely:
    • Microsoft .NET Compact Framework (.NET CF)
    • Microsoft Mobile Internet Toolkit (MMIT)


Microsoft .NET Compact Framework

.NET compact framework is a sub set of entire .NET framework and is targeted at mobile devices having some client side resources. It provides support for managed code and XML Web services.

Microsoft Mobile Internet Toolkit

Microsoft Mobile Internet Toolkit (MMIT) is designed to develop server side applications for mobile devices such as cell phones, PDAs, and pagers. It is different than .NET compact Framework in that it is a server side technology. It is ideal for devices that can not run stand alone applications.

MMIT mainly uses ASP.NET as a technology for delivering markup to a wide variety of mobile devices. As we know that each mobile device has its own set of underlying standards and markup. MMIT shields these details from the developer and allows ‘uniform code’ for any target device. Based on the capabilities of target device the output is rendered.

.NET Framework



.NET Framework Overview

The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:
  • To provide a consistent object-oriented programming environment.
  • To provide a code-execution environment that minimizes software deployment and versioning conflicts.
  • To provide a code-execution environment that promotes the safe execution of code, including code created by an unknown or semi-trusted third party.
  • To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments.
  • To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications.
  • To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.




About C# Tutorial

About this Tutorial

This tutorial is for beginners wanting to get started on .NET Framework. No prior knowledge is necessary. The tutorial covers the basics of .NET Framework, Visual Studio and C#.

.NET History

In July 2000, Microsoft announced a whole new software development framework for Windows called .NET in the Professional Developer Conference (PDC). Microsoft released PDC version of the software for the developers to test. After initial testing and feedback Beta 1 of .NET was announced. Beta 1 of the .NET itself got lot of attention from the developer community. When Microsoft announced Beta 2, it incorporated many changes suggested by the community and internals into the software. The overall ‘Beta’ phase lasted for more than 1 ½ years.

Finally, in March 2002 Microsoft released final version of the .NET framework. One thing to be noted here is the change in approach of Microsoft while releasing this new platform. Unlike other software where generally only a handful people are involved in beta testing, .NET was thrown open to community for testing in it’s every pre-release version. This is one of the reasons why it created so many waves of excitement within the community and industry as well. Microsoft has put in great efforts in this new platform. In fact Microsoft says that its future depends on success of .NET. The development of .NET is such an important event that Microsoft considers it equivalent to transition from DOS to Windows.

All the future development – including new and version upgrades of existing products – will revolve around .NET.

C Sharp (Index)

C# Course Structure

Introduction

  • About This Tutorial
  • .NET Framework
  • Functions Of .NET
  • Features Of .NET

  •  Fundamental Concepts of .NET

    Programming Constructs

    • Variables
    • Operators
    • In-Built Mathematical Functions
    • Control
      • Conditional Statements
      • Iteration Statements
      • Jump Statements
    • Working With Arrays
      • Introduction To Arrays
      • Jagged Arrays
      • Multi-Dimensional Arrays
      • Arrays Of Primitive Types
      • Arrays Of Class Types

    Object-Oriented Programming in C#

    • Classes and Objects
      • Abstract Classes
      • Sealed Classes
      • Static Classes
      • Nested Classes
      • Built In Classes
        • Array
        • ArrayList
        • DateTime
        • Environment
        • Hash Table
        • List<>
        • Object
        • Queue
        • Random
        • Sign
        • Stack
        • Strings
        • Type
    • Methods
      • Static Methods
      • Overriding Methods
      • Anonymous Methods
    • Constructors
    • Destructors
    • Properties and Indexers
      • Asymmetric Accessor Accessibility
    • Polymorphism
      • Overloading
      • Overriding
    • Inheritance
      • Virtual
      • Override
      • new
    • Interfaces
      • Built In Interfaces
        • IClonable
        • IComparable
        • IDisposable
        • IList<>
    • Generics
        • Introducing Generics
        • Generics and Arrays
        • Generic Interfaces
        • Generic Constraints
        • Generics and Lists
    • Iterators
    • Delegates
    • Working with Events

    Advance Topics in C#

    • Attributes
    • Multi-Threading
    • Namespaces
    • Streams and Files
      • Object Serialization and De-Serialization
    • Exceptions Handling
      • System.Diagnostics.StackTrace
    • List And Collection Classes
    • Libraries
      • Built-In Libraries
      • Custom Libraries
    • Working With XML
    • Com Interoperability
    • Security

    Creating New Types

    • Enumerations
    • Structures
    • Nullable Types
    • Comparing References to Values