SlideShare a Scribd company logo
1 of 27
GUI Applications Development Using .NET Framework
Objectives


                In this session, you will learn to:
                   Implement asynchronous programming
                   Use the BackGroundWorker component
                   Implement assemblies




     Ver. 1.0                        Session 13         Slide 1 of 27
GUI Applications Development Using .NET Framework
Implementing Asynchronous Programming


               There are two types of programming. These are:
                – Synchronous programming: In this each time a function is
                  called, program execution waits until that function is
                  completed, before continuing with the next line of code.
                – Asynchronous programming: Allows the user to perform
                  other tasks while the computer is executing a function, which is
                  taking a long time to complete.
               Asynchronous programming is implemented using
               multithreading.
               Multithreading is the ability of an operating system to
               execute the various parts of a program, called threads,
               simultaneously.
               A programmer needs to coordinate multiple threads in such
               a way that all the threads can run at the same time without
               interfering with each other.
    Ver. 1.0                        Session 13                            Slide 2 of 27
GUI Applications Development Using .NET Framework
Components Supporting Asynchronous Methods


                  Some of the components in VC #, which support
                  asynchronous methods are:
                     SoundPlayer component
                     PictureBox component
                     BackgroundWorker component
               • Before using asynchronous methods on a class, which
                 supports asynchronous programming for components, you
                 need to add an event handler to that component’s
                 MethodNameCompleted event.
               • When the MethodNameAsync() method is called the
                 application will continue to run without interruption until the
                 MethodNameCompleted event is raised.




    Ver. 1.0                          Session 13                          Slide 3 of 27
GUI Applications Development Using .NET Framework
Coordinating Multiple Threads


                • There are various thread classes that supports multiple
                  threading in VC#.
                • For coordinating multiple threads in a program the
                  System.Threading namespace provides several classes.
                • These classes are:
                   –   ThreadPool class
                   –   Monitor class
                   –   Mutex class
                   –   ReaderWriterLock class
                   –   Semaphore class




     Ver. 1.0                        Session 13                   Slide 4 of 27
GUI Applications Development Using .NET Framework
Just a minute


                Identify the class which limits the number of threads that
                can access a resource or pool of resources concurrently.
                 1.   ThreadPool class
                 2.   Monitor class
                 3.   Mutex class
                 4.   Semaphore class




                Answer:
                 4. Semaphore class


     Ver. 1.0                       Session 13                        Slide 5 of 27
GUI Applications Development Using .NET Framework
Just a minute


                Which method grants a lock on a resource?




                Answer:
                – The Enter() method


     Ver. 1.0                     Session 13                Slide 6 of 27
GUI Applications Development Using .NET Framework
Coordinating Multiple Threads (Contd.)


                The two main situations, which could create bottlenecks in
                asynchronous programming are as follows:
                   Race Condition
                   Deadlock
                                                   A race condition occurs when
                                                     the outcome of a program
                                                   A deadlock occurs when a
                                                  depends on which of the thread
                                                 thread tries to lock a resource,
                                                  gets access to a particular block
                                                   which is already locked by
                                                            of code first.
                                                   another thread. A deadlock
                                                      blocks the program.




     Ver. 1.0                       Session 13                                        Slide 7 of 27
GUI Applications Development Using .NET Framework
Using the BackGroundWorker Component


               BackGroundWorker component enables simultaneous
               execution of multiple tasks.
               There are several methods and events available with
               BackGroundWorker component to support execution of
               multiple tasks.
               The RunWorkerAsync() method supported by
               BackGroundWorker component, is used to start an
               asynchronous operation.
               The two events supported by BackGroundWorker
               component are:
                  RunWorkerCompleted event
                  DoWork event




    Ver. 1.0                    Session 13                      Slide 8 of 27
GUI Applications Development Using .NET Framework
Just a minute


                Identify the method, which is used to start an asynchronous
                operation.
                 1.   Worker()
                 2.   RunWorkerAsync()
                 3.   CancelAsync()
                 4.   Dispose()




                Answer:
                 2. RunWorkerAsync()


     Ver. 1.0                      Session 13                       Slide 9 of 27
GUI Applications Development Using .NET Framework
Just a minute


                Name the event, which occurs when the background
                operation is completed.




                Answer:
                   The RunWorkerCompleted event


     Ver. 1.0                    Session 13                        Slide 10 of 27
GUI Applications Development Using .NET Framework
Demo: Using the BackGroundWorker Component


               Problem Statement:
                  You have decided to create a simple application that would
                  meet the following requirements:
                   • Ask a user to enter a number.
                   • Calculate the sum of all the numbers from number 1 to the number
                     that is entered by the user, both synchronously and
                     asynchronously.
                   • Display the result of the calculation in a label control.
                   • Show the progress of the calculation in a progress bar.
                  Moreover, if the user wants to display an image while the
                  application is calculating the result, the program allows the
                  user to perform another operation, such as loading a picture or
                  cancelling the calculation.
                  Create the application using the BackGroundWorker
                  component.


    Ver. 1.0                        Session 13                              Slide 11 of 27
GUI Applications Development Using .NET Framework
Demo: Using the BackGroundWorker Component (Contd.)


               Solution:
                  To meet the preceding requirements, you need to perform the
                  following tasks:
                    1. Create a new VC# application.
                    2. Design the BackGroundWorker form.
                    3. Create the SumNumbers function to calculate the sum of the
                       numbers.
                    4. Create the UpdateProgress function to update the progress bar.
                    5. Add code to the controls.
                    6. Execute the application and verify the output.




    Ver. 1.0                         Session 13                               Slide 12 of 27
GUI Applications Development Using .NET Framework
Demo: Creating a New Process Thread and Stopping it


                Problem Statement:
                   You have to create an application with Button controls to start
                   and stop a Notepad process. This application allows the user
                   to start several instances of Notepad individually by clicking the
                   Start Process button and then stop them all simultaneously by
                   clicking the Stop Process button. In addition, the application
                   has a third button, the Wait Sometime button that will wait for
                   three seconds before closing an instance.
                   Help yourself to develop the required application.




     Ver. 1.0                        Session 13                             Slide 13 of 27
GUI Applications Development Using .NET Framework
Demo: Creating a New Process Thread and Stopping it (Contd.)


                Solution:
                   To meet the preceding requirements, you need to perform the
                   following tasks:
                     1.   Create a new VC# application.
                     2.   Design the Thread Demo form.
                     3.   Add code to perform the desired tasks.
                     4.   Execute the program and verify the output.




     Ver. 1.0                           Session 13                     Slide 14 of 27
GUI Applications Development Using .NET Framework
Working with Assemblies


                An assembly:
                   is the smallest deployable unit
                   is a versioned, self-describing binary dynamic link library (DLL)
                   or executable (EXE)
                   contains a collection of types (classes, interfaces, and structs)
                An assembly consists of three elements:
                   Manifest
                   Microsoft Intermediate Language (MSIL) code
                   Resources




     Ver. 1.0                        Session 13                            Slide 15 of 27
GUI Applications Development Using .NET Framework
Types of Assemblies


                    The several types of assemblies are as follows:

                                        Assemblies




                Grouping of elements                        Accessibility




                Single-File        MultiFile           Private          Shared
                Assemblies        Assemblies         Assemblies       Assemblies


     Ver. 1.0                          Session 13                         Slide 16 of 27
GUI Applications Development Using .NET Framework
Creating Strong-Named Assemblies


                A strong name contains the following information about the
                assembly:
                   Name
                   Version number
                   Culture information
                   Public key of a public/private key pair
                A public/private key pair is required to sign an assembly
                with a strong name.
                If the key pair does not exist, it can be generated with the
                strong naming utility (sn.exe).




     Ver. 1.0                        Session 13                        Slide 17 of 27
GUI Applications Development Using .NET Framework
Just a minute


                What is the command to create a strong named key pair,
                and store it in a file using the sn.exe utility?




                Answer:
                   sn –k filename.snk


     Ver. 1.0                     Session 13                      Slide 18 of 27
GUI Applications Development Using .NET Framework
Calling a Strong-Named Assembly


                To add a reference to the strong named assembly in your
                project, you need to perform the following steps:
                1. Right-click the References node in Visual Studio .NET Solution
                   Explorer.
                2. Select the Add Reference option. The Add Reference dialog
                   box appears.
                3. Click the Browse button to locate the assembly.
                4. Select the correct assembly, and click the OK button.
                5. Check the References node in Solution Explorer to verify that
                   the reference to the assembly has been added.
                6. Include the using statement for the namespace of the
                   strong-named assembly in all the source files that require
                   access to the assembly.
                7. Build and run the application.


     Ver. 1.0                       Session 13                           Slide 19 of 27
GUI Applications Development Using .NET Framework
Installing Assemblies to the Global Assembly Cache


                An assembly can be added to the GAC by using any one of
                the following methods:
                   Using the Windows installer, which is compatible with the GAC
                   Using the Gacutil.exe that is the Global Assembly Cache tool
                   Using the Windows drag-and-drop feature
                The advantages of adding assemblies to the GAC are as
                follows:
                   It is possible to share an assembly across an application that
                   requires them.
                   It secures the assemblies against unauthorized access.
                   It is possible to store multiple copies of the same assembly
                   with different version numbers in the GAC.




     Ver. 1.0                       Session 13                            Slide 20 of 27
GUI Applications Development Using .NET Framework
Installing Assemblies to the Global Assembly Cache (Contd.)


                The syntax for adding an assembly using gacutil.exe is as
                follows:
                         gacutil [options] [assemblyname]



                /l: Used to
                   list the       /I :Used to          /u: Used to
                assemblies        register the        unregister or
                  in GAC           assembly            remove the
                                  to the GAC         assembly from
                                                        the GAC




     Ver. 1.0                      Session 13                         Slide 21 of 27
GUI Applications Development Using .NET Framework
Just a minute


                What is the full form of GAC?




                Answer:
                   Global Assembly Cache


     Ver. 1.0                      Session 13   Slide 22 of 27
GUI Applications Development Using .NET Framework
Viewing the Version Information in an Assembly


                • Multiple versions of an assembly can exist because a new
                  version of the component is created every time a
                  component is registered.
                • The version number of the assembly has four parts. The
                  parts are:
                   –   Major version number
                   –   Minor version number
                   –   Build number
                   –   Revision number
                  The version numbers of the assembly help to:
                       identify the latest version of the component
                       identify the version compatibility existing between various
                       versions of the components



     Ver. 1.0                            Session 13                            Slide 23 of 27
GUI Applications Development Using .NET Framework
Viewing the Version Information in an Assembly (Contd.)


                • Whenever the application runs, the .NET platform loads the
                  latest component version to the application.
                • The version information of an assembly is stored in the
                  identity section of the manifest.
                • To view the contents of a manifest for a particular
                  assembly, you can use the ILDisassembler
                  (ILdasm.exe).




     Ver. 1.0                        Session 13                      Slide 24 of 27
GUI Applications Development Using .NET Framework
Just a minute


                Which command is used to view the assembly contents?




                Answer:
                   Ildasm <assembly name>


     Ver. 1.0                    Session 13                    Slide 25 of 27
GUI Applications Development Using .NET Framework
Summary


               In this session, you learned that:
                – In synchronous programming, each time a function is called,
                  program execution waits until that function is completed.
                – By using asynchronous programming, more than one task can
                  be performed at a time.
                – Some of the components that support asynchronous methods
                  are the SoundPlayer, PictureBox, and BackGroundWorker
                  component.
                – The System.Threading namespace provides several
                  classes that enable the users to implement threads in their
                  application.
                – An assembly is a collection of all information required by the
                  Common Language Runtime (CLR) to execute your
                  application.



    Ver. 1.0                        Session 13                          Slide 26 of 27
GUI Applications Development Using .NET Framework
Summary (Contd.)


               An assembly that groups all files in a single file is called a
               single-file assembly. An assembly made up of multiple files is
               called a multifile assembly.
               Assemblies can be either private or shared.
               For sharing an assembly it needs to be installed in the Global
               Assembly Cache.
               There are three methods of placing assemblies in the Global
               Assembly Cache. These methods are:
                   GAC utility tool (GACutil.exe)
                   Windows Installer
                   Windows drag-and-drop feature




    Ver. 1.0                    Session 13                            Slide 27 of 27

More Related Content

What's hot

Testing fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornosTesting fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornosMicael Gallego
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservicesLuram Archanjo
 
JPQL/ JPA Activity 1
JPQL/ JPA Activity 1JPQL/ JPA Activity 1
JPQL/ JPA Activity 1SFI
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjavaAnil Kumar
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)Ron Munitz
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)Ron Munitz
 
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginGr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginYasuharu Nakano
 
Java interview question
Java interview questionJava interview question
Java interview questionsimplidigital
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsLuca Galli
 
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015Codemotion
 

What's hot (14)

Testing fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornosTesting fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornos
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservices
 
JPQL/ JPA Activity 1
JPQL/ JPA Activity 1JPQL/ JPA Activity 1
JPQL/ JPA Activity 1
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
 
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginGr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
 
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015
Ron Munitz - The Ultimate Android Security Checklist - Codemotion Rome 2015
 

Viewers also liked

02 iec t1_s1_plt_session_02
02 iec t1_s1_plt_session_0202 iec t1_s1_plt_session_02
02 iec t1_s1_plt_session_02Niit Care
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# IntroductionSiraj Memon
 

Viewers also liked (8)

07 gui 10
07 gui 1007 gui 10
07 gui 10
 
08 gui 11
08 gui 1108 gui 11
08 gui 11
 
04 gui 05
04 gui 0504 gui 05
04 gui 05
 
02 gui 02
02 gui 0202 gui 02
02 gui 02
 
10 gui 14
10 gui 1410 gui 14
10 gui 14
 
01 gui 01
01 gui 0101 gui 01
01 gui 01
 
02 iec t1_s1_plt_session_02
02 iec t1_s1_plt_session_0202 iec t1_s1_plt_session_02
02 iec t1_s1_plt_session_02
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 

Similar to GUI .NET Asynchronous Programming

Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsPeter Gfader
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in AndroidJohn Pendexter
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayLiz Sims
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.netJaya Kumari
 
Enhance your Agility with DevOps
Enhance your Agility with DevOpsEnhance your Agility with DevOps
Enhance your Agility with DevOpsEdureka!
 
Node js presentation
Node js presentationNode js presentation
Node js presentationshereefsakr
 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181Mahmoud Samir Fayed
 
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdfApplications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdfakshay1213
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180Mahmoud Samir Fayed
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications Concetto Labs
 
Java programming concept
Java programming conceptJava programming concept
Java programming conceptSanjay Gunjal
 
Android Development recipes with java.pptx
Android Development recipes with java.pptxAndroid Development recipes with java.pptx
Android Development recipes with java.pptxabdulqayoomjat2470
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxmoirarandell
 
Tutorial 37 API Coding
Tutorial 37 API CodingTutorial 37 API Coding
Tutorial 37 API CodingMax Kleiner
 
Programming Without Coding Technology (PWCT) - Hyperlink control
Programming Without Coding Technology (PWCT) - Hyperlink controlProgramming Without Coding Technology (PWCT) - Hyperlink control
Programming Without Coding Technology (PWCT) - Hyperlink controlMahmoud Samir Fayed
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseMatt Raible
 

Similar to GUI .NET Asynchronous Programming (20)

Java multi thread programming on cmp system
Java multi thread programming on cmp systemJava multi thread programming on cmp system
Java multi thread programming on cmp system
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in Android
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Enhance your Agility with DevOps
Enhance your Agility with DevOpsEnhance your Agility with DevOps
Enhance your Agility with DevOps
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181
 
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdfApplications use in Java GUIThe Java GUI consists of a separate, .pdf
Applications use in Java GUIThe Java GUI consists of a separate, .pdf
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Java programming concept
Java programming conceptJava programming concept
Java programming concept
 
Android Development recipes with java.pptx
Android Development recipes with java.pptxAndroid Development recipes with java.pptx
Android Development recipes with java.pptx
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docx
 
Tutorial 37 API Coding
Tutorial 37 API CodingTutorial 37 API Coding
Tutorial 37 API Coding
 
Ex11 mini project
Ex11 mini projectEx11 mini project
Ex11 mini project
 
Programming Without Coding Technology (PWCT) - Hyperlink control
Programming Without Coding Technology (PWCT) - Hyperlink controlProgramming Without Coding Technology (PWCT) - Hyperlink control
Programming Without Coding Technology (PWCT) - Hyperlink control
 
manual
manualmanual
manual
 
manual
manualmanual
manual
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 

More from 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
 

Recently uploaded

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 

Recently uploaded (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 

GUI .NET Asynchronous Programming

  • 1. GUI Applications Development Using .NET Framework Objectives In this session, you will learn to: Implement asynchronous programming Use the BackGroundWorker component Implement assemblies Ver. 1.0 Session 13 Slide 1 of 27
  • 2. GUI Applications Development Using .NET Framework Implementing Asynchronous Programming There are two types of programming. These are: – Synchronous programming: In this each time a function is called, program execution waits until that function is completed, before continuing with the next line of code. – Asynchronous programming: Allows the user to perform other tasks while the computer is executing a function, which is taking a long time to complete. Asynchronous programming is implemented using multithreading. Multithreading is the ability of an operating system to execute the various parts of a program, called threads, simultaneously. A programmer needs to coordinate multiple threads in such a way that all the threads can run at the same time without interfering with each other. Ver. 1.0 Session 13 Slide 2 of 27
  • 3. GUI Applications Development Using .NET Framework Components Supporting Asynchronous Methods Some of the components in VC #, which support asynchronous methods are: SoundPlayer component PictureBox component BackgroundWorker component • Before using asynchronous methods on a class, which supports asynchronous programming for components, you need to add an event handler to that component’s MethodNameCompleted event. • When the MethodNameAsync() method is called the application will continue to run without interruption until the MethodNameCompleted event is raised. Ver. 1.0 Session 13 Slide 3 of 27
  • 4. GUI Applications Development Using .NET Framework Coordinating Multiple Threads • There are various thread classes that supports multiple threading in VC#. • For coordinating multiple threads in a program the System.Threading namespace provides several classes. • These classes are: – ThreadPool class – Monitor class – Mutex class – ReaderWriterLock class – Semaphore class Ver. 1.0 Session 13 Slide 4 of 27
  • 5. GUI Applications Development Using .NET Framework Just a minute Identify the class which limits the number of threads that can access a resource or pool of resources concurrently. 1. ThreadPool class 2. Monitor class 3. Mutex class 4. Semaphore class Answer: 4. Semaphore class Ver. 1.0 Session 13 Slide 5 of 27
  • 6. GUI Applications Development Using .NET Framework Just a minute Which method grants a lock on a resource? Answer: – The Enter() method Ver. 1.0 Session 13 Slide 6 of 27
  • 7. GUI Applications Development Using .NET Framework Coordinating Multiple Threads (Contd.) The two main situations, which could create bottlenecks in asynchronous programming are as follows: Race Condition Deadlock A race condition occurs when the outcome of a program A deadlock occurs when a depends on which of the thread thread tries to lock a resource, gets access to a particular block which is already locked by of code first. another thread. A deadlock blocks the program. Ver. 1.0 Session 13 Slide 7 of 27
  • 8. GUI Applications Development Using .NET Framework Using the BackGroundWorker Component BackGroundWorker component enables simultaneous execution of multiple tasks. There are several methods and events available with BackGroundWorker component to support execution of multiple tasks. The RunWorkerAsync() method supported by BackGroundWorker component, is used to start an asynchronous operation. The two events supported by BackGroundWorker component are: RunWorkerCompleted event DoWork event Ver. 1.0 Session 13 Slide 8 of 27
  • 9. GUI Applications Development Using .NET Framework Just a minute Identify the method, which is used to start an asynchronous operation. 1. Worker() 2. RunWorkerAsync() 3. CancelAsync() 4. Dispose() Answer: 2. RunWorkerAsync() Ver. 1.0 Session 13 Slide 9 of 27
  • 10. GUI Applications Development Using .NET Framework Just a minute Name the event, which occurs when the background operation is completed. Answer: The RunWorkerCompleted event Ver. 1.0 Session 13 Slide 10 of 27
  • 11. GUI Applications Development Using .NET Framework Demo: Using the BackGroundWorker Component Problem Statement: You have decided to create a simple application that would meet the following requirements: • Ask a user to enter a number. • Calculate the sum of all the numbers from number 1 to the number that is entered by the user, both synchronously and asynchronously. • Display the result of the calculation in a label control. • Show the progress of the calculation in a progress bar. Moreover, if the user wants to display an image while the application is calculating the result, the program allows the user to perform another operation, such as loading a picture or cancelling the calculation. Create the application using the BackGroundWorker component. Ver. 1.0 Session 13 Slide 11 of 27
  • 12. GUI Applications Development Using .NET Framework Demo: Using the BackGroundWorker Component (Contd.) Solution: To meet the preceding requirements, you need to perform the following tasks: 1. Create a new VC# application. 2. Design the BackGroundWorker form. 3. Create the SumNumbers function to calculate the sum of the numbers. 4. Create the UpdateProgress function to update the progress bar. 5. Add code to the controls. 6. Execute the application and verify the output. Ver. 1.0 Session 13 Slide 12 of 27
  • 13. GUI Applications Development Using .NET Framework Demo: Creating a New Process Thread and Stopping it Problem Statement: You have to create an application with Button controls to start and stop a Notepad process. This application allows the user to start several instances of Notepad individually by clicking the Start Process button and then stop them all simultaneously by clicking the Stop Process button. In addition, the application has a third button, the Wait Sometime button that will wait for three seconds before closing an instance. Help yourself to develop the required application. Ver. 1.0 Session 13 Slide 13 of 27
  • 14. GUI Applications Development Using .NET Framework Demo: Creating a New Process Thread and Stopping it (Contd.) Solution: To meet the preceding requirements, you need to perform the following tasks: 1. Create a new VC# application. 2. Design the Thread Demo form. 3. Add code to perform the desired tasks. 4. Execute the program and verify the output. Ver. 1.0 Session 13 Slide 14 of 27
  • 15. GUI Applications Development Using .NET Framework Working with Assemblies An assembly: is the smallest deployable unit is a versioned, self-describing binary dynamic link library (DLL) or executable (EXE) contains a collection of types (classes, interfaces, and structs) An assembly consists of three elements: Manifest Microsoft Intermediate Language (MSIL) code Resources Ver. 1.0 Session 13 Slide 15 of 27
  • 16. GUI Applications Development Using .NET Framework Types of Assemblies The several types of assemblies are as follows: Assemblies Grouping of elements Accessibility Single-File MultiFile Private Shared Assemblies Assemblies Assemblies Assemblies Ver. 1.0 Session 13 Slide 16 of 27
  • 17. GUI Applications Development Using .NET Framework Creating Strong-Named Assemblies A strong name contains the following information about the assembly: Name Version number Culture information Public key of a public/private key pair A public/private key pair is required to sign an assembly with a strong name. If the key pair does not exist, it can be generated with the strong naming utility (sn.exe). Ver. 1.0 Session 13 Slide 17 of 27
  • 18. GUI Applications Development Using .NET Framework Just a minute What is the command to create a strong named key pair, and store it in a file using the sn.exe utility? Answer: sn –k filename.snk Ver. 1.0 Session 13 Slide 18 of 27
  • 19. GUI Applications Development Using .NET Framework Calling a Strong-Named Assembly To add a reference to the strong named assembly in your project, you need to perform the following steps: 1. Right-click the References node in Visual Studio .NET Solution Explorer. 2. Select the Add Reference option. The Add Reference dialog box appears. 3. Click the Browse button to locate the assembly. 4. Select the correct assembly, and click the OK button. 5. Check the References node in Solution Explorer to verify that the reference to the assembly has been added. 6. Include the using statement for the namespace of the strong-named assembly in all the source files that require access to the assembly. 7. Build and run the application. Ver. 1.0 Session 13 Slide 19 of 27
  • 20. GUI Applications Development Using .NET Framework Installing Assemblies to the Global Assembly Cache An assembly can be added to the GAC by using any one of the following methods: Using the Windows installer, which is compatible with the GAC Using the Gacutil.exe that is the Global Assembly Cache tool Using the Windows drag-and-drop feature The advantages of adding assemblies to the GAC are as follows: It is possible to share an assembly across an application that requires them. It secures the assemblies against unauthorized access. It is possible to store multiple copies of the same assembly with different version numbers in the GAC. Ver. 1.0 Session 13 Slide 20 of 27
  • 21. GUI Applications Development Using .NET Framework Installing Assemblies to the Global Assembly Cache (Contd.) The syntax for adding an assembly using gacutil.exe is as follows: gacutil [options] [assemblyname] /l: Used to list the /I :Used to /u: Used to assemblies register the unregister or in GAC assembly remove the to the GAC assembly from the GAC Ver. 1.0 Session 13 Slide 21 of 27
  • 22. GUI Applications Development Using .NET Framework Just a minute What is the full form of GAC? Answer: Global Assembly Cache Ver. 1.0 Session 13 Slide 22 of 27
  • 23. GUI Applications Development Using .NET Framework Viewing the Version Information in an Assembly • Multiple versions of an assembly can exist because a new version of the component is created every time a component is registered. • The version number of the assembly has four parts. The parts are: – Major version number – Minor version number – Build number – Revision number The version numbers of the assembly help to: identify the latest version of the component identify the version compatibility existing between various versions of the components Ver. 1.0 Session 13 Slide 23 of 27
  • 24. GUI Applications Development Using .NET Framework Viewing the Version Information in an Assembly (Contd.) • Whenever the application runs, the .NET platform loads the latest component version to the application. • The version information of an assembly is stored in the identity section of the manifest. • To view the contents of a manifest for a particular assembly, you can use the ILDisassembler (ILdasm.exe). Ver. 1.0 Session 13 Slide 24 of 27
  • 25. GUI Applications Development Using .NET Framework Just a minute Which command is used to view the assembly contents? Answer: Ildasm <assembly name> Ver. 1.0 Session 13 Slide 25 of 27
  • 26. GUI Applications Development Using .NET Framework Summary In this session, you learned that: – In synchronous programming, each time a function is called, program execution waits until that function is completed. – By using asynchronous programming, more than one task can be performed at a time. – Some of the components that support asynchronous methods are the SoundPlayer, PictureBox, and BackGroundWorker component. – The System.Threading namespace provides several classes that enable the users to implement threads in their application. – An assembly is a collection of all information required by the Common Language Runtime (CLR) to execute your application. Ver. 1.0 Session 13 Slide 26 of 27
  • 27. GUI Applications Development Using .NET Framework Summary (Contd.) An assembly that groups all files in a single file is called a single-file assembly. An assembly made up of multiple files is called a multifile assembly. Assemblies can be either private or shared. For sharing an assembly it needs to be installed in the Global Assembly Cache. There are three methods of placing assemblies in the Global Assembly Cache. These methods are: GAC utility tool (GACutil.exe) Windows Installer Windows drag-and-drop feature Ver. 1.0 Session 13 Slide 27 of 27

Editor's Notes

  1. Start the session by sharing the session objectives with the students.
  2. Initiate the discussion by discussing the disadvantage of synchronous programming. Discuss with them that since the program is executed line by line, therefore the user is unable to perform any other task till the time program is completed. Using this disadvantage as the base, discuss with them that asynchronous programming is beneficial. This can also be discussed with the help of an example. Ask the students the following question: What would happen if they are unable to print a work document while they are creating a worksheet? OR What would happen if they are unable to send a mail while a document is being printed? This would delay the work drastically. Therefore, asynchronous programming or multithreading, actually helps the user to perform various tasks simultaneously.
  3. Using this slide discuss the components and the process to use asynchronous methods on a class.
  4. While using multi-threaded programs, some general problems, such as multiple threads accessing the same resource, might arise. To avoid such problems you need to coordinate multiple threads. Discuss the problems with the students. You can take the following example: There is a document named Standards.doc that is used as a basis for checking the standards used in making presentations for meetings in an InfoTech Ltd. A new employee was asked to use that document while creating the presentation for his Weekly Status Report. He tried to open the document. On the other hand the document was opened by his manager for making some change in one of the standards. Therefore, the new employee is unable to get the latest version of the document. There are certain classes that can be used to avoid this situation. Discuss these classes with the students.
  5. Reiterate the concepts taught earlier by asking the given question.
  6. Reiterate the concepts taught earlier by asking the given question.
  7. Use this slide to discuss the two situations with the students.
  8. Use this slide to discuss with the students the methods and events supported by BackGroundWorker component
  9. Reiterate the concepts taught earlier by asking the given question.
  10. Reiterate the concepts taught earlier by asking the given question.
  11. Conduct the activity stated in the slide in a collaborative mode in the class.
  12. Conduct the activity stated in the slide in a collaborative mode in the class.
  13. Conduct the activity stated in the slide in a collaborative mode in the class.
  14. Conduct the activity stated in the slide in a collaborative mode in the class.
  15. Use this slide to discuss the use of assemblies. Discuss with them that programs and libraries for .NET are packaged into units called assemblies .
  16. Using this slide, discuss all the types of assemblies.
  17. The faculty must discuss the steps given in SG for creating Strong Named Assembly
  18. Reiterate the concepts taught earlier by asking the given question.
  19. The faculty can demonstrate these steps for better understanding of the students. It will be a good practice to first create a strong named assembly and then calling it.
  20. Using this slide, discuss the methods for adding an assembly to the GAC. Also discuss the advantages of doing so.
  21. The faculty can demonstrate this command for better understanding of the students.
  22. Reiterate the concepts taught earlier by asking the given question.
  23. Using this and the next slide, discuss with the students that every time there is a change in the component, the component may be recompiled and the assembly may be created again. Creating the assembly again generates newer versions of the existing assembly. This helps to identify the various versions that have been created for an assembly.
  24. Reiterate the concepts taught earlier by asking the given question.
  25. You can summarize the session by using the summary given in the slides. In addition, you can also ask students summarize what they have learnt in this session.