Content text Visual Programming C# Full Note.pdf
1 Prepared By Sunil Sir Unit I: Introduction to .NET 1.1. .NET framework: Features and Architecture 1.2. .NET Components: Common Language Runtime, Class Library 1.3. .NET Framework, .NET Core, and .NET Standard 1.4. Introduction of Visual Studio and Visual Studio Code IDE, Setting up Visual Studio Development Environment, IntelliSense 1.5 Project Types in .NET Introduction to . Net Frame Work : The .NET Framework is a software development framework developed by Microsoft that provides a runtime environment and a set of libraries and tools for building and running applications on Windows operating systems. The framework includes a variety of programming languages, such as C#, F#, and Visual Basic, and supports a range of application types, including desktop, web, mobile, and gaming applications. 1. The .NET Framework includes two main components: the Common Language Runtime (CLR) and the .NET Framework Class Library. The CLR is responsible for managing the execution of code written in any of the supported languages, while the class library provides a large set of pre-built functions and classes that can be used to create a wide range of applications. 2. One of the key advantages of the .NET Framework is its support for a variety of programming languages. This means that developers can choose the language that best fits their needs and expertise, while still being able to use the same set of libraries and tools provided by the framework. 3. Another advantage of the .NET Framework is its support for a variety of application types. The framework includes libraries and tools for creating desktop, web, mobile, and gaming applications, which makes it a versatile choice for developers working on a wide range of projects. 4. The .NET Framework also provides a number of features that help improve the security, reliability, and performance of applications. These include features such as code access security, automatic memory management, and just-in-time (JIT) compilation, which helps improve the speed of application execution. 5. The .NET Framework is also designed to integrate with other Microsoft technologies, such as Microsoft SQL Server, Microsoft SharePoint, and Microsoft Office, which can make it easier to build applications that work seamlessly with other Microsoft products. Overall, the .NET Framework is a powerful and versatile development platform that provides a wide range of tools and libraries for building and running applications on Windows operating systems. .NET is a software framework that is designed and developed by Microsoft. The first version of the .Net framework was 1.0 which came in the year 2002. In easy words, it is a virtual machine for compiling and executing programs written in different languages like C#, VB.Net, etc. 1 WWW.NOTEDINSIGHTS.COM
2 Prepared By Sunil Sir It is used to develop Form-based applications, Web-based applications, and Web services. There is a variety of programming languages available on the .Net platform, VB.Net and C# being the most common ones. It is used to build applications for Windows, phones, web, etc. It provides a lot of functionalities and also supports industry standards. Features of .net Farmework 1. Language Interoperability: Language Interoperability means code written in any language can be used by other languages and there is an access provided to COM components in the System. In other words, this is the ability of code to interact with code which is written using a different programming language. It can help to maximize code reusability and therefore improve the efficiency of the development process. 2. Portable: The .NET Framework provides a common platform to write portable programs using different languages of .NET environment, based on open Internet standards which allow different devices, software’s and applications to work together across a wide and dispersed network of networks. 3. Type Safety: During program execution, the type checker ensures that all objects and values, and the references to those objects and values, have a valid type. For example, the type checker ensures that only an integer value is assigned to an integer variable. The type checker also ensures that only valid operations are performed on the objects or values. 4. Managed Multithreading Support: Applications running in the CLR can utilize the managed multithreading support. Multithreading requires careful programming For most tasks, you can reduce complexity by queuing requests for execution by thread pool threads. 5. Performance: Its CLR environment promotes safe execution of code, eliminates performance bottlenecks through its garbage collector, minimizes software development conflicts through namespaces and avoids versioning conflicts through assembly manifest. 6. Side by Side Execution: The NET Framework allows you to deploy multiple versions of an application on a system by using assemblies. Assemblies are the deployment units in the NET Framework. An assembly contains the IL code and metadata. The metadata contains information such as the version of the other assemblies on which the assembly depends. The Common Language Runtime uses the version lo information in the metadata to determine application dependencies and enables you to execute multiple versions of an application side-by-side. 7. Common Type System: This provides the necessary data types, values, and object types, which you need to develop applications in different languages. All the NET languages share Common Type System. This implies that a String in Visual Basic .NET is the same as a String in Visual C# or in Visual C++ NET. All the NET languages have access to the same class libraries. In addition, all languages are equally powerful. There is no superior language in .NET i.e. Visual Basic .NET is as powerful as Visual C# or Visual C++ NET. 2 WWW.NOTEDINSIGHTS.COM
3 Prepared By Sunil Sir 8. Parallel Computing: The NET Framework 4.0 introduces a new programming model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. 9. Dynamic Language Runtime: The dynamic language runtime is a new runtime environment that adds a set of services for dynamic languages to the Common Language Runtime. The CLR makes it easier to develop dynamic languages run on the .NET framework and to add dynamic features to statically typed language. 10. Automatic memory management: While developing applications developers had to develop an eye on system resource like memory. ..NET takes this worry away from developer by handling memory on its own. The garbage collector takes care of freeing unused objects at appropriate intervals. A major feature of NET framework CLR is that the runtime automatically handles the allocate and release of an object’s memory resources Automatic memory management enhances code quality and developers productivity without negatively impacting performance The Garbage Collector responsible for collecting the objects no longer referenced by application. 11. Language Independence: Language Independence makes use of the power of various languages in one platform. It means programmer’s can develop their applications in any of the language supported by NET framework .NET framework supports various programming languages such as Microsoft Visual Basic NET, Microsoft Visual J# NET etc. After Compilation the source code of all these languages converted into Common Intermediate Language (CL) that enhances Language Independence. 12. Base Class Library: The Base Class Library (BCL) is a library of functionality available to all languages in the NET Framework. The BCL provides classes that encapsulate a number of common functions including file reading and writing graphic rendering, database interaction, XML document manipulation. 13. Enhancements to ASP. NET & ADO .NET: ASP. NET & ADO .NET is a subset of .NET framework. .NET framework provides enhancement to this technologies. 14. Security: Windows platform was always criticized for poor security mechanisms. Microsoft has taken great efforts to make .NET platform safe and secure for enterprise applications Features such as type safety, code access security etc. Architecture of .Net Framework: Net Architecture is a software architecture used for building applications that run on Microsoft's .NET platform. It provides a set of libraries and tools that simplify the development of complex applications by providing a consistent programming model and a standardized set of APIs. In this article, we will discuss the key components of .NET architecture in C#.. 3 WWW.NOTEDINSIGHTS.COM
4 Prepared By Sunil Sir There are following components of .NET Framework: 1. CLR (Common Language Runtime) 2. CTS (Common Type System) 3. BCL (Base Class Library) 4. CLS (Common Language Specification) 5. FCL (Framework Class Library) 6. .NET Assemblies 7. XML Web Services 8. Window Services CLR (common language runtime) It is an important part of a .NET framework that works like a virtual component of the .NET Framework to executes the different languages program like c#, Visual Basic, etc. A CLR also helps to convert a source code into the byte code, and this byte code is known as CIL (Common Intermediate Language) or MSIL (Microsoft Intermediate Language). After converting into a byte code, a CLR uses a JIT compiler at run time that helps to convert a CIL or MSIL code into the machine or native code. CTS (Common Type System) It specifies a standard that represent what type of data and value can be defined and managed in computer memory at runtime. A CTS ensures that programming data defined in various languages should beinteract with each other to share information. 4 WWW.NOTEDINSIGHTS.COM