Professional Documents
Culture Documents
By,
Asmatullah Khan,
CL/CP, GIOE, Secunderabad.
Contents
1. Define .NET Framework.
2. List the features of .net framework.
3. Draw and explain CLR architecture.
4. Discuss about frame work class Library.
5. Define Microsoft intermediate language.
6. Discuss Common type system CTS, common type language CTL.
7. List .NET languages.
8. List the Advantages of .net over C, C++, Java.
9. Introduction to C#.NET.
10. Describe integrated development environment in c#.net.
11. Describe C#.NET working Environment and browse through menus on
the menu bar.
12. Explain the help system.
13. List the applications of .net.
The common language runtime makes it easy to design components and applications whose objects interact
across languages.
Objects written in different languages can communicate with each other, and their behaviors can be tightly
integrated.
For example,
you can define a class and then use a different language to derive a class from your original class or call a method
on the original class.
You can also pass an instance of a class to a method of a class written in a different language.
Garbage collection.
For example,
one rule is that you cannot use multiple inheritance within .NET Framework. As you know C++
supports multiple inheritance but; when you will try to use that C++ code within C#, it is not
possible because C# doesn’t supports multiple inheritance.
One another rule is that you cannot have members with same name with case difference only i.e.
you cannot have add() and Add() methods. This easily works in C# because it is case-sensitive but
when you will try to use that C# code in VB.NET, it is not possible because VB.NET is not case-
sensitive.
Applications written in Visual C# are built on the services of the common language
runtime and take full advantage of the .NET Framework.
Anyone familiar with C and similar languages will find few problems in adapting to C#. C#
is designed to bring rapid development to the C++ programmer without sacrificing the
power and control that are a hallmark of C and C++. Because of this heritage, C# has a
high degree of fidelity with C and C++, and developers familiar with these languages can
quickly become productive in C#.
C# provides intrinsic code trust mechanisms for a high level of security, garbage
collection, and type safety. C# supports single inheritance and creates Microsoft
intermediate language (MSIL) as input to native code compilers.
Visual C++ has always been the best language for creating high-
performance applications for Microsoft Windows and the World Wide
Web.
You can also use Transact-SQL to create databases and any of the objects
stored in a database, such as tables, columns, triggers, keys, indexes,
views, stored procedures, and functions.
Note:
Visual Database Tools can also connect to an Oracle database. When you
are using an Oracle database, Visual Database Tools correctly handle
Oracle-specific SQL syntax.
With WSH, Microsoft offers VBScript, JScript, and JScript .NET scripting engines.
These scripting languages can be used in the ASP pages of a Web server, in
HTML pages that run in Internet Explorer, and in Windows Script Host scripting
engines on Windows 98 and Windows 2000.
Microsoft Visual Basic Scripting Edition (VBScript) is a subset of Microsoft Visual Basic.
VBScript is specifically designed to work in Internet Explorer (IE) browsers, it does not
include features that are normally outside the scope of scripting, such as file access and
printing. However, it is common to use the FileSystem Object with VBScript to manipulate
files.
VBScript is a loosely typed language. Loosely typed means you do not have to declare the
data types of variables explicitly. In fact, you cannot explicitly declare data types in
VBScript.
Moreover, in many cases VBScript performs conversions automatically when needed. For
instance, if you add a number to an item consisting of text (a string), the number is
converted to text.
JScript is a powerful scripting language specifically targeted at the Internet. Like VBScript,
JScript is an interpreted, object-based scripting language that processes source code
embedded directly in HTML pages.
Like VBScript, JScript talks to host applications using Windows Script Host. With Windows
Script Host, browsers and other host applications do not require special integration code
for each scripting component.
JScript is a loosely typed language. Loosely typed means you do not have to declare the
data types of variables explicitly. In fact, you cannot explicitly declare data types in
JScript.
Moreover, in many cases JScript performs conversions automatically when needed. For
instance, if you add a number to an item consisting of text (a string), the number is
converted to text.
Microsoft partners with many companies to bring their languages to the .NET
Platform. In addition to the languages provided by Microsoft, there are many
alternative languages that target the .NET Platform, including:
4. Reflection capabilities
12. You can't use non-boolean variables (integers, floats...) as conditions. This is much more clean and
less error prone
14. It allows you to treat class-methods' signatures as free functions (i.e. ignoring the statically
typed this pointer argument), and hence create more dynamic and flexible relationships between
classes.
15. It has a huge standard library with so much useful stuff that's well-implemented and easy to use.
18. You can set classes, methods and fields to be assembly-internal (which means they are accessible
from anywhere within the DLL they're declared in, but not from other assemblies).
3. It has more primitive types (value types), including unsigned numeric types
5. Conditional compilation
6. Simplified multithreading
7. Operator overloading. It can make development a bit trickier but they are optional and
sometimes very useful
8. (limited) use of pointers if you really need them, as when calling unmanaged (native)
libraries which doesn't run on top of the virtual machine (CLR).
Advantages of .NET
1. It allows the use of multiple languages
2. It has horizontal scalability
3. .NET creates a unified environment that allows
developers to create programs in C++, Java or Virtual
Basic
4. Interfaces easily with Windows or Microsoft
5. All tools and IDEs have been pre-tested and are easily
available in the Microsoft Developer Network.
6. UI best practices are more consistent
7. Language integration is seamless, as you can call
methods from C# to VB.NET
30-Jan-18 Unit 1 - Understand Basics of .NET Framework 27
A more closer Comparison cont…
Disadvantages of .NET
1. Limited object-relational (OR) support as it comes only
with Entity Framework
2. Does not come with multi platform support from
Microsoft, and is not available right after installing
Visual Studio
3. The managed code can be slower than native code
4. Involves a vendor lock-in, and future development is
solely dependent on Microsoft
5. Migrating applications to .NET can be expensive
Disadvantages of Java
1. It allows the use only of the Java programming
language
2. It is hard to call Scala functions from Groovy
3. As a multi-platform programming language, Java is
considered to be slower than some others and also
requires more memory space
4. More susceptible to security breaches because it is
platform independent
30-Jan-18 Unit 1 - Understand Basics of .NET Framework 31
A more closer Comparison cont…
Applications of Java
1. Its versatility allows it to be equally useful for gaming,
web and enterprise-grade applications
2. Inbuilt networking features allow it to be used for
developing network related programs and software
3. Java generates static HTML content, so it can be used in
web designing
4. Developers use Java for application software
development because it is an Object Oriented
Programming language
5. Java GUI is efficient, making it a preferred choice for
creating app interface
All variables and methods, including the Main method, the application's entry point, are encapsulated within
class definitions.
A class may inherit directly from one parent class, but it may implement any number of interfaces. Methods
that override virtual methods in a parent class require the override keyword as a way to avoid accidental
redefinition.
In C#, a struct is like a lightweight class; it is a stack-allocated type that can implement interfaces but does not
support inheritance.
In addition to these basic object-oriented principles, C# makes it easy to develop software components through
several innovative language constructs, including the following:
Encapsulated method signatures called delegates, which enable type-safe event notifications.
Properties, which serve as accessors for private member variables.
Attributes, which provide declarative metadata about types at run time.
Inline XML documentation comments.
Language-Integrated Query (LINQ) which provides built-in query capabilities across a variety of data sources.
Visual Studio is the Integrated Development Environment in which developers work when
creating programs in one of many languages, including C#, for the .NET Framework .
It is used to create console and graphical user interface (GUI) applications along with
Windows Forms or WPF (Windows Presentation Foundation) applications, web applications,
and web services in both native code together with managed code for all platforms
supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET
Compact Framework and Microsoft Silverlight.
It offers a set of tools that help you to write and modify the code for your programs, and also
detect and correct errors in your programs.
Like any other IDE, it includes a code editor that supports syntax highlighting and code
completion using IntelliSense for not only variables, functions and methods but also
language constructs like loops and queries.
or
The debugger has various windows that display values of variables and
type information as your application is running. You can use the Code
Editor window while debugging to specify a line at which to pause
execution in the debugger, and to step through code one line at a time.