IMPLEMENTING SYSTEM TYPES  AND  INTERFACES 1
Primary System Types <ul><li>System Types </li></ul><ul><li>Simple Types and complex types </li></ul><ul><li>Environments ...
Common Type System <ul><li>Common set of data type </li></ul><ul><li>Base type System. Object </li></ul><ul><li>Value type...
System Types Contd… <ul><li>Reference Types </li></ul><ul><li>Contains references to assigned data. </li></ul><ul><li>Two ...
 
<ul><li>Data type conversion in .net framework. </li></ul><ul><li>Performed either explicitly or implicitly. </li></ul><ul...
Interfaces <ul><li>Interfaces are nothing more than definitions of contracts. </li></ul><ul><li>Single and multiple interf...
Interfaces contd... <ul><li>IFormattable:To format the value of the current instance by specified format. </li></ul><ul><l...
IMPLEMENTING COLLECTIONS AND  GENERICS
Collections <ul><li>You an store several items within one object. </li></ul><ul><li>Arrays:System.Array.To store any type ...
Primary Collection Types <ul><li>For storing multiple unrelated types. </li></ul><ul><li>ArrayList: Similar to single dime...
<ul><li>Hash table class: To represent name /value pairs based on hash code. </li></ul><ul><li>Sorted List Class: To repre...
<ul><li>Generic Linked List class: Nodes that have a common data type. </li></ul><ul><li>Specialized Collections: To serve...
Upcoming SlideShare
Loading in …5
×

Introduction To .Net

344
-1

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
344
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Brief speaker notes are included with this deck.
  • Brief speaker notes are included with this deck.
  • Introduction To .Net

    1. 1. IMPLEMENTING SYSTEM TYPES AND INTERFACES 1
    2. 2. Primary System Types <ul><li>System Types </li></ul><ul><li>Simple Types and complex types </li></ul><ul><li>Environments </li></ul><ul><li>Loosely Typed environment </li></ul><ul><li>You can store multiple types of data </li></ul><ul><li>Cannot ensure type safety </li></ul><ul><li>Strongly Typed environment </li></ul><ul><li>Variable is explicitly assigned </li></ul><ul><li>Ensure type safety </li></ul>2
    3. 3. Common Type System <ul><li>Common set of data type </li></ul><ul><li>Base type System. Object </li></ul><ul><li>Value types </li></ul><ul><li>Contains actual data assigned to them </li></ul><ul><li>Built in : simple Primitive data types </li></ul><ul><li>User Defined </li></ul><ul><li>Structure: Store logically related values </li></ul><ul><li>Constant: Store values that need not changed </li></ul><ul><li>Enumeration: List of named integer constants </li></ul>
    4. 4. System Types Contd… <ul><li>Reference Types </li></ul><ul><li>Contains references to assigned data. </li></ul><ul><li>Two types of reference data type </li></ul><ul><li>Classes </li></ul><ul><li>Like templates </li></ul><ul><li>Interfaces </li></ul><ul><li>Defines standard behavior for classes </li></ul><ul><li>Boxing: Conversion of value type to reference </li></ul><ul><li>Boxing: Explicit conversion of reference to value type </li></ul>
    5. 6. <ul><li>Data type conversion in .net framework. </li></ul><ul><li>Performed either explicitly or implicitly. </li></ul><ul><li>Implicit: Narrow data to wide data. </li></ul><ul><li>Explicit: Wide data to narrow data. </li></ul><ul><li>Generics: Define custom types that are type safe </li></ul><ul><li>Advantages: Reusability ,Type safety, performance.. </li></ul><ul><li>Nullable types: You can assign null values . </li></ul><ul><li>Exceptions: Error conditions. </li></ul><ul><li>Predefined and User defined Exceptions. </li></ul><ul><li>Attributes: To convey information to the run time . </li></ul><ul><li>Predefined and custom Attributes. </li></ul>Casting
    6. 7. Interfaces <ul><li>Interfaces are nothing more than definitions of contracts. </li></ul><ul><li>Single and multiple interfaces </li></ul><ul><li>IComparable: Generalized comparison method. </li></ul><ul><li>IEquitable:Only to generics. Used to check equality. </li></ul><ul><li>IConvertable: To convert an object to CLR type </li></ul><ul><li>IClonable:To create an object and new reference variable </li></ul><ul><li>Shallow Cloning: Copying an object without references </li></ul><ul><li>Deep Cloning: Copying object with references to other objects </li></ul>
    7. 8. Interfaces contd... <ul><li>IFormattable:To format the value of the current instance by specified format. </li></ul><ul><li>IDisposable:To release unmanaged resources explicitly. </li></ul>
    8. 9. IMPLEMENTING COLLECTIONS AND GENERICS
    9. 10. Collections <ul><li>You an store several items within one object. </li></ul><ul><li>Arrays:System.Array.To store any type of data. </li></ul><ul><li>Non Generic :You could store multiple objects </li></ul><ul><li>No guarantee in type safety </li></ul><ul><li>Generic : You can specify the data type you want to store. </li></ul><ul><li>Making development less error – prone. </li></ul><ul><li>Collection Interface: Each interface allows collection class to support a different behavior . </li></ul>
    10. 11. Primary Collection Types <ul><li>For storing multiple unrelated types. </li></ul><ul><li>ArrayList: Similar to single dimension array. </li></ul><ul><li>Stack: Retrieve objects in the reverse order which you added them (LIFO). </li></ul><ul><li>Queue: Retrieve objects in the same order which you added them (FIFO) </li></ul><ul><li>IEnumerable Interface: To iterate through member of collection. </li></ul><ul><li>Comparer Class: Compares two objects to detect if they are less than greater than to one another. </li></ul>
    11. 12. <ul><li>Hash table class: To represent name /value pairs based on hash code. </li></ul><ul><li>Sorted List Class: To represent name /value pairs accessible either by key or by index. </li></ul><ul><li>BitArray Class: You can implement bit structures. </li></ul><ul><li>Generic List Class: Provides methods to sort search and manipulate elements of generic list. </li></ul><ul><li>Generic Stack Class: Represents a variable size LIFO Collection of objects of same data. </li></ul><ul><li>Generic Queue Class: Represents a variable size FIFO Collection of objects of same data. </li></ul>
    12. 13. <ul><li>Generic Linked List class: Nodes that have a common data type. </li></ul><ul><li>Specialized Collections: To serve a special or highly specific purpose. </li></ul><ul><li>Collection base class: Represents an abstract class for a strongly typed collection. </li></ul><ul><li>Read-only Collection Base Class: Represents an abstract base class for a strongly typed non generic collection. </li></ul><ul><li>Dictionary Base Class: Represents an abstract base class for a strongly types collection of key value pairs. </li></ul><ul><li>Dictionary Entry Type: Defines a dictionary key value pair. </li></ul>

    ×