Visual C#.net Theory Notes
Visual C#.net Theory Notes
1 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
LANGUAGE:
Language may refer either to the specifically human capacity for acquiring and using complex systems of communication, or to a specific instance of such a system of complex communication. OR Communication of thoughts and feelings through a system of arbitrary signals, such as voice sounds, gestures, or written symbols. OR A system of objects or symbols, such as sounds or character sequences, that can be combined in various ways following a set of rules, especially to communicate thoughts, feelings, or instructions.
PROGRAM:
A computer program (also software, or just a program) is a sequence of instructions written to perform a specified task with a computer. OR An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner. Without programs, computers are useless. OR Set of ordered instructions that enable a computer to carry out a specific task. A program is prepared by first formulating the task and then expressing it in an appropriate programming language.
SYNTEX:
The syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language. OR Refers to the spelling and grammar of a programming language. Computers are inflexible machines that understand what you type only if you type it in the exact form that the computer expects. The expected form is called the syntax.
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer.
2 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
Computer programming (often shortened to programming or coding) is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.
TYPES OF PROGRAMMING:
Non-Structured Programming Structured Programming Object Oriented Programming Visual Programming
NON-STRUCTURED PROGRAMMING:
Non-structured programming is the historically earliest programming paradigm capable of creating Turing-complete algorithms. It has been followed historically by procedural programming and then object-oriented programming, both of them considered as structured programming. Unstructured programming has been heavily criticized for producing hardly-readable ("spaghetti") code and is sometimes considered a bad approach for creating major projects, but had been praised for the freedom it offers to programmers and has been compared to how Mozart wrote music. There are both high and low level programming languages that use non-structured programming. These include early versions of BASIC (such as MSX BASIC and GW-BASIC), JOSS, FOCAL, MUMPS, TELCOMP, COBOL, machine-level code, early assembler systems (without procedural met operators), assembler debuggers and some scripting languages such as MS-DOS batch file language.
STRUCTURED PROGRAMMING:
Structured programming is a programming paradigm aimed on improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops - in contrast to using simple tests and jumps such as the goto statement which could lead to "spaghetti code" which is both difficult to follow and to maintain. Some of the languages initially used for structured programming languages include: ALGOL, Pascal, PL/I and Ada.
VISUAL PROGRAMMING:
3 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
A programming language that uses a visual representation such as graphics, drawings, animation or icons, partially or completely. A visual language manipulates visual information or supports visual interaction, or allows programming with visual expressions A visual programming language (VPL) is any programming language that lets users create programs by manipulating program elements graphically rather than by specifying them textually. A VPL allows programming with visual expressions, spatial arrangements of text and graphic symbols used either as elements of syntax or secondary notation.
2. DEBUGGER
Visual Studio includes a debugger that works both as a source-level debugger and as a machine-level debugger. It works with both managed code as well as native code and can be used for debugging applications written in any language supported by Visual Studio. In addition, it can also attach to running processes and monitor and debug those processes. If
4 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
source code for the running process is available, it displays the code as it is being run. If source code is not available, it can show the disassembly. The debugger allows setting breakpoints and watches. Breakpoints can be conditional, meaning they get triggered when the condition is met. Code can be stepped over, i.e., run one line (of source code) at a time. It can either step into functions to debug inside it, or step over it, i.e., the execution of the function body isn't available for manual inspection.
3. DESIGNER
Visual Studio includes a host of visual designers to aid in the development of applications. These tools include:
Windows Forms Designer The Windows Forms designer is used to build GUI applications using Windows Forms. Layout can be controlled by housing the controls inside other containers or locking them to the side of the form. Controls that display data (like textbox, list box, grid view, etc.) can be bound to data sources like databases or queries. WPF Designer It is used to author user interfaces targeting Windows Presentation Foundation. It supports all WPF functionality including data binding and automatic layout management. Web designer/development It is used for developing ASP.NET applications and supports HTML, CSS and JavaScript. It uses a code-behind model to link with ASP.NET code. Class designer The Class Designer is used to author and edit the classes (including its members and their access) using UML modeling. The Class Designer can generate C# and VB.NET code outlines for the classes and methods. Data designer The data designer can be used to graphically edit database schemas, including typed tables, primary and foreign keys and constraints. It can also be used to design queries from the graphical view. Mapping designer The mapping designer is used by LINQ to SQL to design the mapping between database schemas and the classes that encapsulate the data.
5 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
Design features
Interoperability
Because computer systems commonly require interaction between newer and older applications, the .NET Framework provides means to access functionality implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System. Runtime. Interpol Services and System. Enterprise Services namespaces of the framework; access to other functionality is provided using the P/Invoke feature.
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible datatypes and programming constructs supported by the CLR and how they may or may not interact with each other conforming to the Common Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming .NET language.
The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction, XML document manipulation and so on.
Simplified Deployment
The .NET Framework includes design features and tools which help manage the installation of computer software to ensure it does not interfere with previously installed software, and it conforms to security requirements.
Security
The design is meant to address some of the vulnerabilities, such as buffer overflows, which have been exploited by malicious software. Additionally, .NET provides a common security model for all applications.
Portability
While Microsoft has never implemented the full framework on any system except Microsoft Windows, the framework is engineered to be platform agnostic, and cross-platform implementations are available for other operating systems.Microsoft submitted the specifications for the Common Language Infrastructure (which includes the core class libraries, Common Type System, and the Common Intermediate Language)the C# language, and the C+ +/CLI language to both ECMA and the ISO, making them available as open standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.
C #:
Microsoft Visual C# is a powerful but simple language aimed primarily at developers creating Applications by using the Microsoft .NET Framework.
7 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014
C# is Microsofts premier language for .NET development. It leverages time-tested features with cutting-edge innovations and provides a highly usable, efficient way to write programs for the modern enterprise computing environment. It is, by any measure, one of the most important languages of the twenty-first century. It was first released in its alpha version in the middle of 2000. C#s chief architect was Anders Hejlsberg. C# is directly related to C, C++, and Java. This is not by accident. These are three of the most widely usedand most widely likedprogramming languages in the world.
VALUE TYPES
A value type is either a struct type or an enumeration type.
REFERENCE TYPES
A reference type is a class type, an interface type, an array type, or a delegate type.
All numeric data types Boolean, Char, and Date All structures, even if their members are reference types Enumerations, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong
String All arrays, even if their elements are value types Class types, such as Form Delegates
8 This Notes Are Compiled By : Yasir Ahmed Khan | Email: yasirahmedkhan@ymail.com | 03337015014