Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Building Applications using c#
Description: there is a wide and understandable explanation of showing how applications are build using c#
Description: there is a wide and understandable explanation of showing how applications are build using c#
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
1
Building Applications Using
C#
Objectives
◆
Define and describe the
...
NET Framework
◆
The
...
NET technologies
...
Building Applications Using C# / Session 1
3
The
...
Applications became platform-independent with the emergence of
Internet, which ensured that they could be run on PCs with different
hardware and software combination
...
Building Applications Using C# / Session 1
4
The
...
NET Framework Architecture 3-8
◆
◆
◆
All the transformations are supported by the technology
platform introduced by Microsoft called as
...
Data stored using the
...
NET compatible
device
...
NET Framework:
🞛
🞛
🞛
Is a programming platform that is used for developing Windows, Webbased, and mobile software
...
Is based on two basic technologies for communication of data:
– eXtensible Markup Language (XML)
– The suite of Internet protocols
Building Applications Using C# / Session 1
6
The
...
It unlocks information that can be organized, programmed, and edited
...
Thus,
they can interact with each other
...
Apart from XML, the
...
NET Framework Architecture 5-8
◆
In traditional Windows applications:
🞛
◆
Using the
...
The code of a program is compiled into CIL (formerly called MSIL) and
stored in a file called assembly
...
The following figure represents the process of conversion of CIL
code to the native code:
Building Applications Using C# / Session 1
8
The
...
Building Applications Using C# / Session 1
9
The
...
NET Framework to
include additional capabilities and functionalities with every newer
version
...
NET Framework:
...
0
...
1
...
0
...
0
...
5
...
0
...
5
Building Applications Using C# / Session 1
10
The
...
NET Framework and
Visual Studio:
Year
2002
...
0
Distributed with OS
IDE Name
Visual Studio
...
1
Windows Server 2003
Visual Studio
...
0
2006
3
...
5
2010
2012
4
4
...
NET
2008
Framework 3
...
NET Framework Fundamentals
◆
◆
The
...
🞛
🞛
🞛
🞛
Provide consistent object-oriented
programming environment
...
Promote safe execution of code by
providing a code-execution environment
...
C++
C#
JScript
…
Common Language Specification
Application Class Libraries & Services
Base Class Library
Visual Studio
...
NET Framework is
designed to:
VB
Common Language Runtime
Building Applications Using C# / Session 1
12
...
NET Framework integral to any
application or service development are:
• Is a backbone of
...
NET Framework
Class Library (FCL)
• Memory management
• Code execution
• Error handling
• Code safety verification
• Garbage collection
• Is a comprehensive object-oriented collection of reusable types
...
Building Applications Using C# / Session 1
13
Using
...
NET
...
NET Framework
...
Console
...
NET Architecture");
◆
◆
The same WriteLine() method will be used across all
...
This is done by making the Framework Class Library as a common
class library for all
...
Building Applications Using C# / Session 1
14
Other Components of
...
NET
ADO
...
NET Entity Framework
Parallel LINQ
Task Parallel Library
Building Applications Using C# / Session 1
15
Other Components of
...
Base Framework Classes:
🞛
◆
Is a set of rules that any
...
These classes provide basic functionality such as input/output, string
manipulation, security management, network communication, and so on
...
NET:
🞛
Provides classes to interact with databases
...
NET Framework 3-4
◆
ASP
...
ASP
...
Supports Web services that can be accessed using a standard set of
protocols
...
Uses 3D computer graphics hardware and Direct3D technologies to
create desktop applications with rich UI on the Windows platform
...
Allows creating service endpoints and allows programs to
asynchronously send and receive data from the service endpoint
...
NET Framework 4-4
◆
LINQ:
🞛
◆
ADO
...
NET that enables creating datacentric applications in object-oriented manner
...
NET
application
...
Task Parallel Library:
🞛
Is a library that simplifies parallel and concurrent programming in a
...
Building Applications Using C# / Session 1
18
Common Intermediate Language (CIL) 1-2
◆
◆
◆
◆
◆
◆
Every
...
The compiler converts the source code into executable code that
can be run by the users
...
NET Framework is to combine the
runtime environments so that the developers can work with a
single set of runtime services
...
NET compatible language such as C#
or VB is compiled, the output code is in the form of MSIL code
...
MSIL is now called as Common Intermediate Language (CIL)
...
NET Framework
...
NET Framework
...
Provides a multi-language execution environment
...
NET Framework supports a number of development tools
and language compilers in its Software Development Kit (SDK)
...
This is done at runtime by the Just-In-Time (JIT) compiler present in the CLR
...
Once this is done, the code can be directly executed by the CPU
...
NET Framework
...
NET Framework
...
For
example, C# relies on the DLR to perform dynamic binding
...
NET Framework languages, such as C#, VB, and J# are statically
typed languages
...
Building Applications Using C# / Session 1
24
Need for a New Language
◆
◆
Microsoft introduced C# as a new programming language to
address the problems posed by traditional languages
...
Create a complete object-oriented architecture
...
Allow access to many features previously available only in C++ while
retaining the ease-of-use of a rapid application development tool such as
Visual Basic
...
Allow to write applications that target both desktop and mobile devices
...
NET was formerly known as Next Generation Windows
Services (NGWS)
...
These applications transcend device boundaries and fully harness
the power of the Internet
...
This is one of the factors that led to the development of C#
...
The goal of C# is to provide a simple, efficient, productive, and
object-oriented language that is familiar and yet at the same time
revolutionary
...
It has language-specific features, such as:
🞛
🞛
🞛
◆
Type safety checking
Generics
Indexers
These features make the C# as a preferred language to create
a wide variety of applications
...
NET Framework
...
Generic Types and Methods:
🞛
◆
Performs automatic memory management from time to time and spares the
programmer the task
...
Garbage Collection:
🞛
◆
Focuses on objects so that code written once can be reused
...
Are a type of data structure that contains code that remains the same throughout but
the data type of the parameters can change with each use
...
Static Classes: Contain only static members and do not require instantiation
...
cs) files
...
◆
Methods with named Arguments: Enable the user to associate a method argument
with a name rather than its position in the argument list
...
◆
◆
Nullable Types: Allow a variable to contain a value that is undefined
...
◆
Auto-implemented Properties: Allow the user to create a property without explicitly
providing the methods to get and set the value of the property
...
Building Applications Using C# / Session 1
30
Applications of C#
◆
◆
C# is an object-oriented language that can be used in a number of
applications
...
The advantages of C# are as follows:
Cross Language Support:
The code written in any other
...
🞛
Common Internet Protocols:
🞛
🞛
...
Additionally, support for transfer via SOAP is also integrated
...
An assembly is a self-describing collection of code and resources
...
XML Documentation:
🞛
🞛
🞛
Comments can be placed in XML format and can then be used as needed to document your code
...
It makes sense for a developer to document his or her code because those comments can actually
become documentation independent of the source code
...
Performing these tasks manually is both, time-consuming and
difficult
...
This means that there is no need to write code to allocate memory
when objects are created or to release memory when objects are
not required in the application
...
Building Applications Using C# / Session 1
33
Garbage Collection
◆
Garbage collection:
🞛
🞛
◆
Is the process of automatic reclaiming of memory from objects that are no
longer in scope
...
The following figure illustrates concept of garbage collection:
Building Applications Using C# / Session 1
34
Visual Studio 2012 Environment
◆
Visual Studio 2012 Environment:
🞛
🞛
🞛
🞛
🞛
🞛
Provides the environment to create, deploy, and run applications
developed using the
...
Comprises the Visual Studio Integrated Development Environment (IDE),
which is a comprehensive set of tools, templates, and libraries required
to create
...
Is a complete set of development tools for building high performance
desktop applications, XML Web Services, mobile applications, and ASP
Web applications
...
Is an IDE used to ease the development process of
...
Uses the same IDE, debugger, Solution Explorer, Properties tab, Toolbox,
standard menus, and toolbars for all the
...
Building Applications Using C# / Session 1
35
Introduction to Visual Studio 2012 1-3
◆
The following features of IDE make it useful for an easier
development process:
🞛
🞛
🞛
🞛
🞛
🞛
🞛
A single environment is provided for developing the
...
Several programming languages are available to choose from for
developing applications
...
A program can be executed with or without a debugger
...
The application provides Dynamic Help on a number of topics using the
MSDN library
...
Building Applications Using C# / Session 1
36
Introduction to Visual Studio 2012 2-3
◆
The IDE:
🞛
🞛
🞛
🞛
◆
Can be customized, based on the user’s preferences
...
NET applications
...
The user
can either compile a single source file or the complete project
...
Some commonly used visual designers are as follows:
🞛
🞛
🞛
🞛
🞛
Windows Form Designer: Allows programmers to design the layout of Windows
forms and drag and drop controls to it
...
NET Web pages
...
Class Designer: Allows programmers to use UML modeling to design classes, its
members, and relationships between classes
...
Building Applications Using C# / Session 1
37
Introduction to Visual Studio 2012 3-3
◆
◆
Visual Studio 2012 provides multiple advantages in the
development process
...
NET Framework 4
...
The different editions of Visual Studio 2012 are:
Visual Studio Professional 2012
• This is the entry-level edition that provides support for developing and debugging
applications, such as Web, desktop, cloud-based, and mobile applications
...
• In addition, this edition includes Team Foundation Server and provides access to cloud,
Windows Store, and Windows Phone Marketplace
...
Visual Studio Premium 2012 with
MSDN
• This edition provides all the features of the combined Visual Studio Professional 2012 and
Visual Studio Test Professional 2012 with MSDN editions
...
Visual Studio Ultimate 2012 with
MSDN
• This edition has all the features of the other editions
...
Building Applications Using C# / Session 1
39
Languages in Visual Studio 2012
◆
Visual Studio 2012 supports multiple programming languages such
as:
🞛
🞛
🞛
🞛
◆
◆
Visual Basic
...
It makes Visual Studio 2012 more flexible
...
🞛
Reduced Development Complexity:
– Visual Studio 2012 enables customers to deliver more easily a broad range
of
...
🞛
Edit Marks:
– Visual Studio 2012 provides a visual indication of the changes that are
made and not saved and changes that are made during the current
session that have been saved to the disk
...
Building Applications Using C# / Session 1
41
Features of Visual Studio 2012 2-2
🞛
AutoRecover:
– Visual Studio 2012 automatically saves the work on a regular basis and
thus, minimizes loss of information due to unexpected closing of unsaved
files
...
🞛
IntelliSense:
– Visual Studio 2012 has the IntelliSense feature in which syntax tips, lists of
methods, variables and classes pop up continually when entering code in
the Code Editor, making the process of entering code more efficient
...
– It changes the internal structure of the code, specifically the design of its
objects, to make it more comprehensible, maintainable, and efficient
without changing its behavior
...
NET applications
...
Gives you ready access to the commands that
pertain to these projects
...
The reference node consists of the assemblies
referenced in the current project
...
cs is the
name of the source file
...
NET
solution is saved in a
...
csproj file and the source code is saved
in a
...
Building Applications Using C# / Session 1
44
Key Elements 2-9
◆
Code Editor:
🞛
🞛
Used to write, display and edit
form, event and method code
...
Building Applications Using C# / Session 1
45
Key Elements 3-9
◆
Properties Window:
🞛
🞛
🞛
Used to view and change the
design-time properties and events
of selected objects that are
located in editors and designers
...
Shows included fields such as edit
boxes, drop-down lists, and links
to custom editor dialog boxes
...
🞛 Displays the contents of the Toolbox
window and change according to the
type of form the user is creating or
editing
...
🞛
Building Applications Using C# / Session 1
47
Key Elements 5-9
◆
To use the controls or components from the Toolbox:
🞛
🞛
🞛
🞛
The user can drag and drop the required control or component onto a form
...
This Clipboard Ring contains the last 20 items that have been cut or copied so
that they can be pasted into the document, if necessary
...
Building Applications Using C# / Session 1
48
Key Elements 6-9
◆
Server Explorer:
🞛
🞛
Is the server management console
used for opening data connections,
logging on to servers, exploring
databases, and system services
...
The Error List window does the following:
Displays the errors, warnings, and messages produced when the code is edited
and compiled
...
Finds the deployment errors, certain static analysis errors, and errors detected
while applying Enterprise Template policies
...
When the error occurs, the user can find out the location of the error by doubleclicking the error message in the Error List window
...
Building Applications Using C# / Session 1
52
csc Command 1-4
◆
◆
◆
Console applications that are created in C# run in a console
window
...
The csc (C Sharp Compiler) command can be used to compile
a C# program
...
2
...
Create a New Project
...
Execute the Program
...
– Select New → Project from the File menu
...
– Specify the name and location for the project and click OK
...
Collections
...
Linq;
using System
...
Threading
...
WriteLine("This is a sample C# program");
Building Applications Using C# / Session 1
54
csc Command 3-4
◆
Compile a C# Program:
🞛
A C# program can be compiled using the following syntax:
csc
cs
🞛
In the example:
– SampleProgram: Specifies the name of the program to be compiled
...
exe
...
exe file
...
🞛
The following figure shows the developer command prompt for VS2012 window:
🞛
🞛
The
...
The portable EXE works on any operating system that supports the
...
Building Applications Using C# / Session 1
56
Build and Execute
◆
◆
The IDE also provides the necessary support to compile and
execute C# programs
...
This action will create an executable
file (
...
🞛
Executing the Program:
– Select Start Without Debugging from the Debug menu
...
NET Framework is an infrastructure that enables building, deploying, and
running different types of applications and services using
...
The two core components of the
...
NET Framework class
library
...
NET that is used to convert the CIL
code to the machine language code
...
The C# language provides the feature of allocating and releasing memory using
automatic memory management
...
NET framework
...
NET, Visual C++, Visual C#, Visual J#, and Visual F#
Title: Building Applications using c#
Description: there is a wide and understandable explanation of showing how applications are build using c#
Description: there is a wide and understandable explanation of showing how applications are build using c#