SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Objectives


                In this session, you will learn to:
                   Describe the purpose of collections and collection interfaces
                   Implement the various classes available in the .NET
                   Framework 2.0
                   Implement generic list types, collections, dictionary types, and
                   linked-list types
                   Implement specialized string and named collection classes
                   Implement collection base classes and dictionary base types
                   Describe the purpose and creation of an assembly
                   Share an assembly by using the Global Assembly Cache
                   Install an assembly by using the Installer,
                   AssemblyInstaller, ComponentInstaller,
                   InstallerCollection, and InstallContext classes and
                   the InstallEventHandler delegate available in the .NET
                   Framework 2.0

     Ver. 1.0                                                              Slide 1 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Examining Collections and Collection Interfaces


                What are Collections?
                • Collections are classes used to store arbitrary objects in an
                  organized manner.
                • Types of collections available in .Net Framework are:
                      Arrays: Are available in the System.Array namespace and can
                      store any type of data.
                      Advanced Collections: Are found in the System.Collections
                      namespace and consist of the following collections:
                           Non-Generic Collections: With a non-generic collection, you could
                           store multiple types of objects in the collection simultaneously.
                           Generic Collections: When you create an instance of a generic
                           collection, you determine and specify the data type you want to store
                           in that collection.




     Ver. 1.0                                                                         Slide 2 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Examining Collections and Collection Interfaces (Contd.)


                What are Collection Interfaces?
                 • Collection interfaces specify all the necessary properties and
                   methods for an implementing class to provide the required
                   functionality and behavior of a collection.
                 • Every collection class, non-generic or generic, implements at
                   least one or more collection interfaces.




     Ver. 1.0                                                              Slide 3 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types


                Create a Flexible Collection of Reference Types by Using
                ArrayList class
                 • The ArrayList class is defined in the
                   System.Collections namespace.
                 • An ArrayList represents a list, which is similar to a single-
                   dimensional array that you can resize dynamically.
                 • The ArrayList does not provide type safety.




                                  Dynamic Resizing




     Ver. 1.0                                                                 Slide 4 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                The following code snippet creates an ArrayList to store
                names of countries:
                ArrayList countries = new ArrayList();
                 countries.Add("Belgium");
                 countries.Add ("China");
                 countries.Add("France");
                 foreach (string country in countries)
                 {
                 Console.WriteLine (country);
                 }




     Ver. 1.0                                                     Slide 5 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                Manage Collections by Using Stacks and Queues
                • You can use Stacks and Queues to store elements when the
                  sequence of storing and retrieving them is an important issue.
                • Stacks follow the last-in-first-out (LIFO) principle while Queues
                  follow the first-in-first-out (FIFO).




                                                               Queue      FIFO




                   Stack      LIFO



     Ver. 1.0                                                              Slide 6 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                •   The following code example shows the implementation of
                    the Stack class:
                    Stack s1 = new Stack();
                     s1.Push("1"); s1.Push("2"); s1.Push("3");
                     Console.WriteLine("topmost element: " +
                         s1.Peek());
                     Console.WriteLine("total elements: " +
                         s1.Count);
                     while (s1.Count > 0) {             Console.Write(" " +
                         s1.Pop());
                     }
                     The output of the code example will be:
                     topmost element: 3
                     total elements: 3
                     321
     Ver. 1.0                                                           Slide 7 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                •   The following code example shows the implementation of
                    the Queue class:
                    Queue q1 = new Queue();
                     q1.Enqueue("1");q1.Enqueue("2");q1.Enqueue("3");
                     Console.WriteLine("topmost element: " +
                         q1.Peek());
                     Console.WriteLine("total elements: " +
                         q1.Count);
                     while (q1.Count > 0) {
                           Console.Write(" " + q1.Dequeue());
                     }
                     The output of the code example will be:
                     topmost element: 1
                     total elements: 3
                     123
     Ver. 1.0                                                        Slide 8 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                Enumerate the Elements of a Collection by Using an
                Enumerator
                • Iterators are sections of code that return an ordered sequence
                  of values of the same type.
                • They allow you to create classes and treat those as
                  enumerable types and enumerable objects.




     Ver. 1.0                                                            Slide 9 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                Access Reference Types Based on Key/Value Pairs and
                Comparers
                   The Comparer class compares two objects to detect if they
                   are less than, greater than, or equal to one another.
                   The Hashtable class represents a collection of name/value
                   pairs that are organized on the basis of the hash code of the
                   key being specified.
                   The SortedList class represents a collection of name/value
                   pairs that are accessible either by key or by index, but sorted
                   only by keys.




     Ver. 1.0                                                             Slide 10 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                •   The following code example shows the implementation of
                    the Comparer class:
                    string str1 = "visual studio .net";
                    string str2 = "VISUAL STUDIO .NET";
                    string str3 = "visual studio .net";
                    Console.WriteLine("str1 and str2 : " +
                       Comparer.Default.Compare(str1, str2));
                    Console.WriteLine("str1 and str3 : " +
                       Comparer.Default.Compare(str1, str3));
                    Console.WriteLine("str2 and str3 : " +
                       Comparer.Default.Compare(str2, str3));




     Ver. 1.0                                                        Slide 11 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                The following code example creates a new instance of the
                Hashtable class, named currency:
                Hashtable currencies = new Hashtable();
                currencies.Add("US", "Dollar");
                currencies.Add("Japan", "Yen");
                currencies.Add("France", "Euro");
                Console.Write("US Currency: {0}",
                    currencies["US"]);




     Ver. 1.0                                                     Slide 12 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                The following code example shows the implementation of
                the SortedList class:
                SortedList slColors = new SortedList();
                slColors.Add("forecolor", "black");
                slColors.Add("backcolor", "white");
                slColors.Add("errorcolor", "red");
                slColors.Add("infocolor", "blue");
                foreach (DictionaryEntry de in slColors)
                 {
                    Console.WriteLine(de.Key + " = " + de.Value);
                 }




     Ver. 1.0                                                    Slide 13 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Primary Collection Types (Contd.)


                Store Boolean Values in a BitArray by Using the BitArray
                Class
                   The BitArray class implements a bit structure, which
                   represents a collection of binary bits, 1s and 0s.
                   The Set and Get methods can be used to assign Boolean
                   values to a bit structure on the basis of the index of the
                   elements.
                   The SetAll is used to set the same value for all the
                   elements.




     Ver. 1.0                                                           Slide 14 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Just a minute


                If you place a set of dinner plates, one on top of the
                other, the topmost plate is the first one that you can
                pick up and use. According to you, which class follows
                the same principle?
                   Queue
                   BitArray
                   Stack
                   Hashtable



                Answer
                   Stack




     Ver. 1.0                                                       Slide 15 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Generic Collections


                Create Type-Safe Collections by Using Generic List Types
                   The generic List class provides methods to search, sort, and
                   manipulate the elements of a generic list.
                   The generic List class can be used to create a list that
                   provides the behavior of an ArrayList.




     Ver. 1.0                                                          Slide 16 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Generic Collections (Contd.)


                The following code example shows the implementation of
                the generic List:
                List<string>names = new List<string>();
                names.Add("Michael Patten");
                names.Add("Simon Pearson");
                names.Add("David Pelton");
                names.Add("Thomas Andersen");
                foreach (string str in names)
                {
                    Console.WriteLine(str);
                }




     Ver. 1.0                                                    Slide 17 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Generic Collections (Contd.)


                Create Type-Safe Collections by Using Generic Collections
                   The generic Stack class functions similarly to the non-generic
                   Stack class except that a generic Stack class contains
                   elements of a specific data type.
                   The generic Queue class is identical to the non-generic Queue
                   class except that the generic Queue class contains elements of
                   a specific data type.
                   The generic Queue class is used for FIFO applications.
                   The generic Stack class is used for LIFO applications.




     Ver. 1.0                                                           Slide 18 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Generic Collections (Contd.)


                Access Reference Types Based on Type-Safe Key/Value
                Pairs
                • In generic key/value pairs, the key is defined as one data type
                  and the value is declared as another data type.
                • The following classes can be used to add name and value
                  pairs to a collection:
                      Dictionary: Represents in the value the actual object stored,
                      while the key is a means to identify a particular object.
                      SortedList: Refers to a collection of unique key/value pairs
                      sorted by a key.
                      SortedDictionary: Uses a faster search algorithm than a
                      SortedList, but more memory.




     Ver. 1.0                                                                Slide 19 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Generic Collections (Contd.)


                Create Type-Safe Doubly Linked Lists by Using Generic
                Collections
                   With the generic LinkedList class, you can define nodes
                   that have a common data type with each node pointing to the
                   previous and following nodes.
                   With a strongly typed doubly linked list you can traverse
                   forward and backward through the nodes to reach a particular
                   node.




                                                               Doubly LinkedList



     Ver. 1.0                                                           Slide 20 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Just a minute


                What is a doubly linked list?




                Answer
                   A collection in which each node points to the previous and
                   following nodes is referred to as a doubly linked list.



     Ver. 1.0                                                            Slide 21 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Specialized Collections


                What Are Specialized Collections?
                   Specialized collections are predefined collections that serve a
                   special or highly specific purpose.
                   These collections exist in the
                   System.Collections.Specialized namespace
                   The various specialized collections available in .Net
                   Framework are:
                       String classes
                       Dictionary classes
                       Named collection classes
                       Bit structures




     Ver. 1.0                                                              Slide 22 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Just a minute


                What is a specialized string collection?




                Answer
                   A specialized string collection provides several string-specific
                   functions to create type-safe strings.



     Ver. 1.0                                                               Slide 23 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Collection Base Classes


                Create Custom Collections by Using Collection Base
                Classes
                   Collection base classes provide the abstract base class for
                   strongly typed non-generic collections.
                   The read-only version of the CollectionBase class is the
                   ReadOnlyCollectionBase class.




     Ver. 1.0                                                            Slide 24 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working with Collection Base Classes (Contd.)


                Create Custom Dictionary Types by Using Dictionary Base
                Types
                   Dictionary base types provide the most convenient way to
                   implement a custom dictionary type.
                   Custom dictionary types can be created by using:
                      DictionaryBase class
                      DictionaryEntry structure




     Ver. 1.0                                                           Slide 25 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Just a minute


                Categorize the following features into CollectionBase
                class and the DictionaryBase type?
                    Helps create custom collections
                    Helps create a custom dictionary
                    Provides the public member Count
                    Is a base collection of key value/pairs




                Answer
                 Collection Base class              Dictionary Base type
                 Helps create custom collections    Helps create a custom dictionary
                 Provides the public member Count Is a base collection of key value/pairs


     Ver. 1.0                                                                           Slide 26 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working With An Assembly


                What Is an Assembly?
                • An assembly is a self-contained unit of code that contains all
                  the security, versioning, and dependency information.
                • Assemblies have several benefits like:
                      Resolve conflicts arising due to versioning issues.
                      Can be ported to run on multiple operating systems.
                      Are self-dependant.




     Ver. 1.0                                                               Slide 27 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working With An Assembly (Contd.)


                Create an Assembly
                • You can create the following two types of Assemblies.
                    • Single-file assemblies: are self-contained assemblies.
                    • Multifile assemblies: store different elements of an assembly in
                      different files.
                • You can create an assembly either at the command prompt by
                  using command-line compilers or by using an IDE such as
                  Visual Studio .NET 2005.
                                  Types of Assemblies




                              Single-file         Multifile

     Ver. 1.0                                                                   Slide 28 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working With An Assembly (Contd.)


                To create an assembly with the .exe extension at the
                command prompt, use the following syntax:
                   compiler command module name
                   For example, if you want to compile a code module
                   called myCode into an assembly you can type the
                   following command:
                   csc myCode.cs




     Ver. 1.0                                                      Slide 29 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Working With An Assembly (Contd.)


                The three most common forms of assemblies are:
                   .dll : A .dll file is an in-process executable file. This file cannot
                   be run independently and is called by other executable files.
                   .exe: An .exe file is an out-of-process executable file that you
                   can run independently. An .exe file can contain references to
                   the .dll files that get loaded at run time.
                   .netmodule: A .netmodule is a block of code for compilation. It
                   contains only the type metadata and the MSIL code.




     Ver. 1.0                                                                   Slide 30 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Sharing an Assembly by Using the Global Assembly Cache


                What is Global Assembly Cache?
                • The global assembly cache is a system-wide code cache
                  managed by the common language runtime.
                • Any assembly that needs to be shared among other
                  applications is typically installed in the global assembly cache.
                • On the basis of sharing, assemblies can be categorized into
                  two types, private assemblies and shared assemblies.




     Ver. 1.0                                                              Slide 31 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Sharing an Assembly by Using the Global Assembly Cache (Contd.)


                Creating and Assigning a Strong Name to an Assembly
                • A strong name provides a unique identity to an assembly.
                • For installing an assembly in the global assembly cache, you
                  must assign a strong name to it.
                • You can use Sn.exe provided by the .NET Framework to
                  create and assign a strong name to an assembly.
                • For creating a strong name for an assembly you can open the
                  Visual Studio 2005 Command Prompt and type the following
                  command:
                    •   SN -k KeyPairs.snk
                   SN is the command to generate the strong key and
                   Keypairs.snk is the filename where you are storing this key.




     Ver. 1.0                                                             Slide 32 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Sharing an Assembly by Using the Global Assembly Cache (Contd.)


                Deploy an Assembly into the Global Assembly Cache
                • Deploying an assembly in the global assembly cache is
                  necessary when you need to share the assembly with other
                  applications.
                • There are three methods to deploy an assembly into the global
                  assembly cache:
                    • Windows Explorer
                    • Gacutil.exe
                    • Installers
                • The syntax to use Gacutil.exe is gacutil –i/assembly name. The
                  -i option is used to install the assembly into the global
                  assembly cache.




     Ver. 1.0                                                          Slide 33 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types


                What are Assembly Installers?
                • Assembly installers are used to automate the process of
                  installing assemblies.
                • You can create installers either by using:
                      Visual Studio: Allows you to create four types of installers:
                        •   Setup project
                        •   Web Setup project
                        •   Merge Module project
                        •   CAB project
                    • Command Prompt: Enables more flexibility in customizing your
                      assembly installers.




     Ver. 1.0                                                                     Slide 34 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types (Contd.)


                Create Custom Installation Applications by Using the
                Installer Class
                 • The .NET Framework provides the Installer class as a base
                   class to create custom installer classes.
                 • To create a custom installer class in your setup code, perform
                   the following steps:
                       Create a class that is inherited from the Installer class.
                       Implement overrides for the Install, Commit, Rollback, and
                       Uninstall methods.
                       Add RunInstallerAttribute to the derived class and set it to
                       true.
                       Invoke the installer.




     Ver. 1.0                                                              Slide 35 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types (Contd.)


                Install an Assembly by Using the AssemblyInstaller
                Class
                   You can use the AssemblyInstaller class to load an
                   assembly and run all its installer classes.
                   The AssemblyInstaller class belongs to the
                   System.Configuration.Install namespace.




     Ver. 1.0                                                      Slide 36 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types (Contd.)


                Copy Component Settings for Runtime Installation
                   ComponentInstaller class that has the ability to let custom
                   installer classes to access information from other running
                   components during the installation process.
                   The installer can access the required information from another
                   component by calling the CopyFromComponent method of the
                   ComponentInstaller class.

                      Custom Installer                  Running Components
                         Classes




     Ver. 1.0                                                           Slide 37 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types (Contd.)


                Manage Assembly Installation by Using Installer
                Classes
                • The .NET Framework provides the following Installer
                  classes:
                      InstallerCollection: Provides methods and properties that
                      the application will require to manage a collection of Installer
                      objects.
                      InstallContext: Maintains the context of the installation in
                      progress.




     Ver. 1.0                                                                 Slide 38 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Installing an Assembly by Using Installation Types (Contd.)


                Handle Installation Events by Using the
                InstallEventHandler Delegate
                 • InstallEventHandler delegate can be used to run custom
                   actions at certain points during the installation process.
                 • The various events that can be handled during installation are:
                       BeforeInstall
                       AfterInstall
                       Committing
                       Committed
                       BeforeRollback
                       AfterRollback
                       BeforeUninstall
                       AfterUninstall




     Ver. 1.0                                                             Slide 39 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Summary


                In this session, you learned that:
                   Collections are classes in which you store a set of arbitrary
                   objects in a structured manner.
                   Collection interfaces specify all the necessary properties and
                   methods for an implementing class to provide the required
                   functionality and behavior of a collection.
                   Primary or non-generic collection types can be dynamically
                   resized, but do not provide type safety.
                   Stack and Queue classes are helpful for storing a set of
                   objects in a collection where the sequence of adding objects is
                   important.
                   Type-safe doubly linked lists can be created by using generic
                   collections.
                   Specialized collections are predefined collections that serve a
                   special or highly specific purpose.


     Ver. 1.0                                                             Slide 40 of 41
Core Development with the Microsoft .NET Framework 2.0 Foundation

Summary (Contd.)


                Collection base classes provide the abstract base class for
                strongly typed non-generic collections.
                An assembly is a collection of types and resources that are
                built to work together and form a logical unit of functionality.
                The global assembly cache is a system-wide code cache
                managed by the Common Language Runtime (CLR).
                An assembly that is installed in the global assembly cache to
                be used by different applications is known as a shared
                assembly.
                Assembly installer is a utility that help automate installation and
                uninstallation activities and processes.




     Ver. 1.0                                                             Slide 41 of 41

Weitere ähnliche Inhalte

Andere mochten auch

important DotNet Questions For Practicals And Interviews
important DotNet Questions For Practicals And Interviewsimportant DotNet Questions For Practicals And Interviews
important DotNet Questions For Practicals And InterviewsRahul Jain
 
All .net Interview questions
All .net Interview questionsAll .net Interview questions
All .net Interview questionsAsad Masood Qazi
 
C# console programms
C# console programmsC# console programms
C# console programmsYasir Khan
 
10 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_1410 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_14Niit Care
 
How To Code in C#
How To Code in C#How To Code in C#
How To Code in C#David Ringsell
 

Andere mochten auch (7)

important DotNet Questions For Practicals And Interviews
important DotNet Questions For Practicals And Interviewsimportant DotNet Questions For Practicals And Interviews
important DotNet Questions For Practicals And Interviews
 
All .net Interview questions
All .net Interview questionsAll .net Interview questions
All .net Interview questions
 
C# interview
C# interviewC# interview
C# interview
 
C# console programms
C# console programmsC# console programms
C# console programms
 
10 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_1410 iec t1_s1_oo_ps_session_14
10 iec t1_s1_oo_ps_session_14
 
How To Code in C#
How To Code in C#How To Code in C#
How To Code in C#
 
C sharp
C sharpC sharp
C sharp
 

Ähnlich wie Net framework session02

Net framework session02
Net framework session02Net framework session02
Net framework session02Vivek chan
 
Net framework session01
Net framework session01Net framework session01
Net framework session01Niit Care
 
Assemblies in asp
Assemblies in aspAssemblies in asp
Assemblies in aspEr Varun Kumar
 
Net framework session03
Net framework session03Net framework session03
Net framework session03Niit Care
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NETDutch Dasanaike {LION}
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05Niit Care
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qaabcxyzqaz
 
(E Book) Asp .Net Tips, Tutorials And Code
(E Book) Asp .Net Tips,  Tutorials And Code(E Book) Asp .Net Tips,  Tutorials And Code
(E Book) Asp .Net Tips, Tutorials And Codesyedjee
 
Introduction to .NET
Introduction to .NETIntroduction to .NET
Introduction to .NETJoni
 
Module 8 : Implementing collections and generics
Module 8 : Implementing collections and genericsModule 8 : Implementing collections and generics
Module 8 : Implementing collections and genericsPrem Kumar Badri
 
Linked list basics
Linked list basicsLinked list basics
Linked list basicsRajesh Kumar
 
Week_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdfWeek_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdfPrabhaK22
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIESProf Ansari
 

Ähnlich wie Net framework session02 (20)

Net framework session02
Net framework session02Net framework session02
Net framework session02
 
Net framework session01
Net framework session01Net framework session01
Net framework session01
 
Assemblies in asp
Assemblies in aspAssemblies in asp
Assemblies in asp
 
Net framework session03
Net framework session03Net framework session03
Net framework session03
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qa
 
EnScript Workshop
EnScript WorkshopEnScript Workshop
EnScript Workshop
 
.Net 3.5
.Net 3.5.Net 3.5
.Net 3.5
 
2310 b 03
2310 b 032310 b 03
2310 b 03
 
(E Book) Asp .Net Tips, Tutorials And Code
(E Book) Asp .Net Tips,  Tutorials And Code(E Book) Asp .Net Tips,  Tutorials And Code
(E Book) Asp .Net Tips, Tutorials And Code
 
Vb
VbVb
Vb
 
Introduction to .NET
Introduction to .NETIntroduction to .NET
Introduction to .NET
 
C# for beginners
C# for beginnersC# for beginners
C# for beginners
 
Module 8 : Implementing collections and generics
Module 8 : Implementing collections and genericsModule 8 : Implementing collections and generics
Module 8 : Implementing collections and generics
 
Linked list basics
Linked list basicsLinked list basics
Linked list basics
 
C# Unit 1 notes
C# Unit 1 notesC# Unit 1 notes
C# Unit 1 notes
 
Week_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdfWeek_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdf
 
The Philosophy of .Net
The Philosophy of .NetThe Philosophy of .Net
The Philosophy of .Net
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
 

Mehr von Niit Care

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 bNiit Care
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 bNiit Care
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 aNiit Care
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 cNiit Care
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 bNiit Care
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 aNiit Care
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 cNiit Care
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 bNiit Care
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 aNiit Care
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 cNiit Care
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 aNiit Care
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 cNiit Care
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-cNiit Care
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-bNiit Care
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-aNiit Care
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-cNiit Care
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-bNiit Care
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-aNiit Care
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 bNiit Care
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 cNiit Care
 

Mehr von Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

KĂźrzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

KĂźrzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Net framework session02

  • 1. Core Development with the Microsoft .NET Framework 2.0 Foundation Objectives In this session, you will learn to: Describe the purpose of collections and collection interfaces Implement the various classes available in the .NET Framework 2.0 Implement generic list types, collections, dictionary types, and linked-list types Implement specialized string and named collection classes Implement collection base classes and dictionary base types Describe the purpose and creation of an assembly Share an assembly by using the Global Assembly Cache Install an assembly by using the Installer, AssemblyInstaller, ComponentInstaller, InstallerCollection, and InstallContext classes and the InstallEventHandler delegate available in the .NET Framework 2.0 Ver. 1.0 Slide 1 of 41
  • 2. Core Development with the Microsoft .NET Framework 2.0 Foundation Examining Collections and Collection Interfaces What are Collections? • Collections are classes used to store arbitrary objects in an organized manner. • Types of collections available in .Net Framework are: Arrays: Are available in the System.Array namespace and can store any type of data. Advanced Collections: Are found in the System.Collections namespace and consist of the following collections: Non-Generic Collections: With a non-generic collection, you could store multiple types of objects in the collection simultaneously. Generic Collections: When you create an instance of a generic collection, you determine and specify the data type you want to store in that collection. Ver. 1.0 Slide 2 of 41
  • 3. Core Development with the Microsoft .NET Framework 2.0 Foundation Examining Collections and Collection Interfaces (Contd.) What are Collection Interfaces? • Collection interfaces specify all the necessary properties and methods for an implementing class to provide the required functionality and behavior of a collection. • Every collection class, non-generic or generic, implements at least one or more collection interfaces. Ver. 1.0 Slide 3 of 41
  • 4. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types Create a Flexible Collection of Reference Types by Using ArrayList class • The ArrayList class is defined in the System.Collections namespace. • An ArrayList represents a list, which is similar to a single- dimensional array that you can resize dynamically. • The ArrayList does not provide type safety. Dynamic Resizing Ver. 1.0 Slide 4 of 41
  • 5. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) The following code snippet creates an ArrayList to store names of countries: ArrayList countries = new ArrayList(); countries.Add("Belgium"); countries.Add ("China"); countries.Add("France"); foreach (string country in countries) { Console.WriteLine (country); } Ver. 1.0 Slide 5 of 41
  • 6. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) Manage Collections by Using Stacks and Queues • You can use Stacks and Queues to store elements when the sequence of storing and retrieving them is an important issue. • Stacks follow the last-in-first-out (LIFO) principle while Queues follow the first-in-first-out (FIFO). Queue FIFO Stack LIFO Ver. 1.0 Slide 6 of 41
  • 7. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) • The following code example shows the implementation of the Stack class: Stack s1 = new Stack(); s1.Push("1"); s1.Push("2"); s1.Push("3"); Console.WriteLine("topmost element: " + s1.Peek()); Console.WriteLine("total elements: " + s1.Count); while (s1.Count > 0) { Console.Write(" " + s1.Pop()); } The output of the code example will be: topmost element: 3 total elements: 3 321 Ver. 1.0 Slide 7 of 41
  • 8. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) • The following code example shows the implementation of the Queue class: Queue q1 = new Queue(); q1.Enqueue("1");q1.Enqueue("2");q1.Enqueue("3"); Console.WriteLine("topmost element: " + q1.Peek()); Console.WriteLine("total elements: " + q1.Count); while (q1.Count > 0) { Console.Write(" " + q1.Dequeue()); } The output of the code example will be: topmost element: 1 total elements: 3 123 Ver. 1.0 Slide 8 of 41
  • 9. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) Enumerate the Elements of a Collection by Using an Enumerator • Iterators are sections of code that return an ordered sequence of values of the same type. • They allow you to create classes and treat those as enumerable types and enumerable objects. Ver. 1.0 Slide 9 of 41
  • 10. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) Access Reference Types Based on Key/Value Pairs and Comparers The Comparer class compares two objects to detect if they are less than, greater than, or equal to one another. The Hashtable class represents a collection of name/value pairs that are organized on the basis of the hash code of the key being specified. The SortedList class represents a collection of name/value pairs that are accessible either by key or by index, but sorted only by keys. Ver. 1.0 Slide 10 of 41
  • 11. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) • The following code example shows the implementation of the Comparer class: string str1 = "visual studio .net"; string str2 = "VISUAL STUDIO .NET"; string str3 = "visual studio .net"; Console.WriteLine("str1 and str2 : " + Comparer.Default.Compare(str1, str2)); Console.WriteLine("str1 and str3 : " + Comparer.Default.Compare(str1, str3)); Console.WriteLine("str2 and str3 : " + Comparer.Default.Compare(str2, str3)); Ver. 1.0 Slide 11 of 41
  • 12. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) The following code example creates a new instance of the Hashtable class, named currency: Hashtable currencies = new Hashtable(); currencies.Add("US", "Dollar"); currencies.Add("Japan", "Yen"); currencies.Add("France", "Euro"); Console.Write("US Currency: {0}", currencies["US"]); Ver. 1.0 Slide 12 of 41
  • 13. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) The following code example shows the implementation of the SortedList class: SortedList slColors = new SortedList(); slColors.Add("forecolor", "black"); slColors.Add("backcolor", "white"); slColors.Add("errorcolor", "red"); slColors.Add("infocolor", "blue"); foreach (DictionaryEntry de in slColors) { Console.WriteLine(de.Key + " = " + de.Value); } Ver. 1.0 Slide 13 of 41
  • 14. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Primary Collection Types (Contd.) Store Boolean Values in a BitArray by Using the BitArray Class The BitArray class implements a bit structure, which represents a collection of binary bits, 1s and 0s. The Set and Get methods can be used to assign Boolean values to a bit structure on the basis of the index of the elements. The SetAll is used to set the same value for all the elements. Ver. 1.0 Slide 14 of 41
  • 15. Core Development with the Microsoft .NET Framework 2.0 Foundation Just a minute If you place a set of dinner plates, one on top of the other, the topmost plate is the first one that you can pick up and use. According to you, which class follows the same principle? Queue BitArray Stack Hashtable Answer Stack Ver. 1.0 Slide 15 of 41
  • 16. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Generic Collections Create Type-Safe Collections by Using Generic List Types The generic List class provides methods to search, sort, and manipulate the elements of a generic list. The generic List class can be used to create a list that provides the behavior of an ArrayList. Ver. 1.0 Slide 16 of 41
  • 17. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Generic Collections (Contd.) The following code example shows the implementation of the generic List: List<string>names = new List<string>(); names.Add("Michael Patten"); names.Add("Simon Pearson"); names.Add("David Pelton"); names.Add("Thomas Andersen"); foreach (string str in names) { Console.WriteLine(str); } Ver. 1.0 Slide 17 of 41
  • 18. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Generic Collections (Contd.) Create Type-Safe Collections by Using Generic Collections The generic Stack class functions similarly to the non-generic Stack class except that a generic Stack class contains elements of a specific data type. The generic Queue class is identical to the non-generic Queue class except that the generic Queue class contains elements of a specific data type. The generic Queue class is used for FIFO applications. The generic Stack class is used for LIFO applications. Ver. 1.0 Slide 18 of 41
  • 19. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Generic Collections (Contd.) Access Reference Types Based on Type-Safe Key/Value Pairs • In generic key/value pairs, the key is defined as one data type and the value is declared as another data type. • The following classes can be used to add name and value pairs to a collection: Dictionary: Represents in the value the actual object stored, while the key is a means to identify a particular object. SortedList: Refers to a collection of unique key/value pairs sorted by a key. SortedDictionary: Uses a faster search algorithm than a SortedList, but more memory. Ver. 1.0 Slide 19 of 41
  • 20. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Generic Collections (Contd.) Create Type-Safe Doubly Linked Lists by Using Generic Collections With the generic LinkedList class, you can define nodes that have a common data type with each node pointing to the previous and following nodes. With a strongly typed doubly linked list you can traverse forward and backward through the nodes to reach a particular node. Doubly LinkedList Ver. 1.0 Slide 20 of 41
  • 21. Core Development with the Microsoft .NET Framework 2.0 Foundation Just a minute What is a doubly linked list? Answer A collection in which each node points to the previous and following nodes is referred to as a doubly linked list. Ver. 1.0 Slide 21 of 41
  • 22. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Specialized Collections What Are Specialized Collections? Specialized collections are predefined collections that serve a special or highly specific purpose. These collections exist in the System.Collections.Specialized namespace The various specialized collections available in .Net Framework are: String classes Dictionary classes Named collection classes Bit structures Ver. 1.0 Slide 22 of 41
  • 23. Core Development with the Microsoft .NET Framework 2.0 Foundation Just a minute What is a specialized string collection? Answer A specialized string collection provides several string-specific functions to create type-safe strings. Ver. 1.0 Slide 23 of 41
  • 24. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Collection Base Classes Create Custom Collections by Using Collection Base Classes Collection base classes provide the abstract base class for strongly typed non-generic collections. The read-only version of the CollectionBase class is the ReadOnlyCollectionBase class. Ver. 1.0 Slide 24 of 41
  • 25. Core Development with the Microsoft .NET Framework 2.0 Foundation Working with Collection Base Classes (Contd.) Create Custom Dictionary Types by Using Dictionary Base Types Dictionary base types provide the most convenient way to implement a custom dictionary type. Custom dictionary types can be created by using: DictionaryBase class DictionaryEntry structure Ver. 1.0 Slide 25 of 41
  • 26. Core Development with the Microsoft .NET Framework 2.0 Foundation Just a minute Categorize the following features into CollectionBase class and the DictionaryBase type? Helps create custom collections Helps create a custom dictionary Provides the public member Count Is a base collection of key value/pairs Answer Collection Base class Dictionary Base type Helps create custom collections Helps create a custom dictionary Provides the public member Count Is a base collection of key value/pairs Ver. 1.0 Slide 26 of 41
  • 27. Core Development with the Microsoft .NET Framework 2.0 Foundation Working With An Assembly What Is an Assembly? • An assembly is a self-contained unit of code that contains all the security, versioning, and dependency information. • Assemblies have several benefits like: Resolve conflicts arising due to versioning issues. Can be ported to run on multiple operating systems. Are self-dependant. Ver. 1.0 Slide 27 of 41
  • 28. Core Development with the Microsoft .NET Framework 2.0 Foundation Working With An Assembly (Contd.) Create an Assembly • You can create the following two types of Assemblies. • Single-file assemblies: are self-contained assemblies. • Multifile assemblies: store different elements of an assembly in different files. • You can create an assembly either at the command prompt by using command-line compilers or by using an IDE such as Visual Studio .NET 2005. Types of Assemblies Single-file Multifile Ver. 1.0 Slide 28 of 41
  • 29. Core Development with the Microsoft .NET Framework 2.0 Foundation Working With An Assembly (Contd.) To create an assembly with the .exe extension at the command prompt, use the following syntax: compiler command module name For example, if you want to compile a code module called myCode into an assembly you can type the following command: csc myCode.cs Ver. 1.0 Slide 29 of 41
  • 30. Core Development with the Microsoft .NET Framework 2.0 Foundation Working With An Assembly (Contd.) The three most common forms of assemblies are: .dll : A .dll file is an in-process executable file. This file cannot be run independently and is called by other executable files. .exe: An .exe file is an out-of-process executable file that you can run independently. An .exe file can contain references to the .dll files that get loaded at run time. .netmodule: A .netmodule is a block of code for compilation. It contains only the type metadata and the MSIL code. Ver. 1.0 Slide 30 of 41
  • 31. Core Development with the Microsoft .NET Framework 2.0 Foundation Sharing an Assembly by Using the Global Assembly Cache What is Global Assembly Cache? • The global assembly cache is a system-wide code cache managed by the common language runtime. • Any assembly that needs to be shared among other applications is typically installed in the global assembly cache. • On the basis of sharing, assemblies can be categorized into two types, private assemblies and shared assemblies. Ver. 1.0 Slide 31 of 41
  • 32. Core Development with the Microsoft .NET Framework 2.0 Foundation Sharing an Assembly by Using the Global Assembly Cache (Contd.) Creating and Assigning a Strong Name to an Assembly • A strong name provides a unique identity to an assembly. • For installing an assembly in the global assembly cache, you must assign a strong name to it. • You can use Sn.exe provided by the .NET Framework to create and assign a strong name to an assembly. • For creating a strong name for an assembly you can open the Visual Studio 2005 Command Prompt and type the following command: • SN -k KeyPairs.snk SN is the command to generate the strong key and Keypairs.snk is the filename where you are storing this key. Ver. 1.0 Slide 32 of 41
  • 33. Core Development with the Microsoft .NET Framework 2.0 Foundation Sharing an Assembly by Using the Global Assembly Cache (Contd.) Deploy an Assembly into the Global Assembly Cache • Deploying an assembly in the global assembly cache is necessary when you need to share the assembly with other applications. • There are three methods to deploy an assembly into the global assembly cache: • Windows Explorer • Gacutil.exe • Installers • The syntax to use Gacutil.exe is gacutil –i/assembly name. The -i option is used to install the assembly into the global assembly cache. Ver. 1.0 Slide 33 of 41
  • 34. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types What are Assembly Installers? • Assembly installers are used to automate the process of installing assemblies. • You can create installers either by using: Visual Studio: Allows you to create four types of installers: • Setup project • Web Setup project • Merge Module project • CAB project • Command Prompt: Enables more flexibility in customizing your assembly installers. Ver. 1.0 Slide 34 of 41
  • 35. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types (Contd.) Create Custom Installation Applications by Using the Installer Class • The .NET Framework provides the Installer class as a base class to create custom installer classes. • To create a custom installer class in your setup code, perform the following steps: Create a class that is inherited from the Installer class. Implement overrides for the Install, Commit, Rollback, and Uninstall methods. Add RunInstallerAttribute to the derived class and set it to true. Invoke the installer. Ver. 1.0 Slide 35 of 41
  • 36. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types (Contd.) Install an Assembly by Using the AssemblyInstaller Class You can use the AssemblyInstaller class to load an assembly and run all its installer classes. The AssemblyInstaller class belongs to the System.Configuration.Install namespace. Ver. 1.0 Slide 36 of 41
  • 37. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types (Contd.) Copy Component Settings for Runtime Installation ComponentInstaller class that has the ability to let custom installer classes to access information from other running components during the installation process. The installer can access the required information from another component by calling the CopyFromComponent method of the ComponentInstaller class. Custom Installer Running Components Classes Ver. 1.0 Slide 37 of 41
  • 38. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types (Contd.) Manage Assembly Installation by Using Installer Classes • The .NET Framework provides the following Installer classes: InstallerCollection: Provides methods and properties that the application will require to manage a collection of Installer objects. InstallContext: Maintains the context of the installation in progress. Ver. 1.0 Slide 38 of 41
  • 39. Core Development with the Microsoft .NET Framework 2.0 Foundation Installing an Assembly by Using Installation Types (Contd.) Handle Installation Events by Using the InstallEventHandler Delegate • InstallEventHandler delegate can be used to run custom actions at certain points during the installation process. • The various events that can be handled during installation are: BeforeInstall AfterInstall Committing Committed BeforeRollback AfterRollback BeforeUninstall AfterUninstall Ver. 1.0 Slide 39 of 41
  • 40. Core Development with the Microsoft .NET Framework 2.0 Foundation Summary In this session, you learned that: Collections are classes in which you store a set of arbitrary objects in a structured manner. Collection interfaces specify all the necessary properties and methods for an implementing class to provide the required functionality and behavior of a collection. Primary or non-generic collection types can be dynamically resized, but do not provide type safety. Stack and Queue classes are helpful for storing a set of objects in a collection where the sequence of adding objects is important. Type-safe doubly linked lists can be created by using generic collections. Specialized collections are predefined collections that serve a special or highly specific purpose. Ver. 1.0 Slide 40 of 41
  • 41. Core Development with the Microsoft .NET Framework 2.0 Foundation Summary (Contd.) Collection base classes provide the abstract base class for strongly typed non-generic collections. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. The global assembly cache is a system-wide code cache managed by the Common Language Runtime (CLR). An assembly that is installed in the global assembly cache to be used by different applications is known as a shared assembly. Assembly installer is a utility that help automate installation and uninstallation activities and processes. Ver. 1.0 Slide 41 of 41

Hinweis der Redaktion

  1. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  2. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  3. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  4. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  5. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  6. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  7. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  8. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  9. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  10. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  11. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  12. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  13. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  14. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  15. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  16. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  17. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  18. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  19. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  20. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  21. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  22. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  23. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  24. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  25. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  26. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  27. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  28. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  29. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  30. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  31. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  32. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  33. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  34. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  35. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  36. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  37. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  38. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  39. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  40. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  41. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.