0% found this document useful (0 votes)
48 views8 pages

AWP Notes

.NET is a cross-platform, open-source framework that includes .NET Core, ASP.NET Core, and Xamarin. It allows developers to build applications for web, desktop, mobile, and more across Windows, Linux, and macOS. The .NET Framework is a Windows-only framework that includes the full CLR and BCL but is not cross-platform. Key differences are that .NET is cross-platform, open-source, and supports deployment of self-contained applications, while the .NET Framework only supports Windows and requires the framework to be installed.

Uploaded by

chaubeyabhi7070
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views8 pages

AWP Notes

.NET is a cross-platform, open-source framework that includes .NET Core, ASP.NET Core, and Xamarin. It allows developers to build applications for web, desktop, mobile, and more across Windows, Linux, and macOS. The .NET Framework is a Windows-only framework that includes the full CLR and BCL but is not cross-platform. Key differences are that .NET is cross-platform, open-source, and supports deployment of self-contained applications, while the .NET Framework only supports Windows and requires the framework to be installed.

Uploaded by

chaubeyabhi7070
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Q1. Why choose .NET ?

I. Productivity:-
• .NET helps you to develop high quality applications faster.
• .NET offers advanced language features like generics, LINQ, and asynchronous
programming, along with extensive class libraries and multi-language support for
developers.
II. Any app, any platform.
• With .NET you can target any application type running on any platform.
• Developers can reuse skills and code across all of them in a familiar environment.
That means developers can build apps faster, with less cost.
• From mobile applications running on iOS, Android, and Windows, to Enterprise
server applications running on Windows Server and Linux, or high-scale
microservices running in the cloud, .NET provides a solution for you.
III. Loved by developers
• .NET is a modern, innovative, open source development platform and developers love it.
• .NET ranked as the #1 most-loved framework on the Stack Overflow Developer Survey
for three years in a row (2019, 2020, and 2021).
IV. Performance where it matters.
• .NET is fast. Really fast! That means applications provide better response times and
require less compute power.
• The popular TechEmpower benchmark compares web application frameworks with tasks
like JSON serialization, database access, and server side template rendering - .NET
performs faster than any other popular framework.
V. Trusted and secure.
• The .NET platform is officially supported by Microsoft and trusted by thousands of
companies and millions of developers.
• Microsoft takes security very seriously and releases updates quickly when threats are
discovered.
VI. Large ecosystem.
• With over 5,000,000 .NET developers worldwide, you can leverage the large
ecosystem by incorporating libraries from the NuGet package manager and the
Visual Studio Marketplace.
• Find answers to technical challenges from the community, our MVPs, and our large
support organization.
VII. Open source.
• The .NET Foundation is an independent non-profit supporting the innovative,
commercially friendly, open source .NET ecosystem.
• .NET has over 100,000 contributions from developers from over 3,700 companies
outside of Microsoft.
• In addition to the community and Microsoft, Technical Steering Group members,
Google, JetBrains, Red Hat, Samsung and Unity are guiding the future of the .NET
platform.

Q2. Create an application to demonstrate String operation.


Program:-

using System;

namespace program

class StringOperation

static void Main(string [] args)

string str1="Abhi" ,str2="chaubey";

Console.WriteLine("String 1: "+str1);

Console.WriteLine("String 2: "+str2);

//Length

Console.WriteLine("\nString 1 Length :"+str1.Length);

//Concat

Console.Write("\nString Concat : "+string.Concat(str1,str2));

//Trim

Console.Write("\nString2 Trim() : "+str2.Trim());

//ToUpper

Console.Write("\nString 1 ToUpper() : "+str1.ToUpper());

//ToLower

Console.Write("\nString 2 ToUpper() : "+str2.ToLower());

//SubString

Console.Write("\nString2 Substring() : "+str2.Substring(0,2));

Console.ReadKey();
}

Q3. What Is object based manipuflation ? Explain in details.

Q4. Explain the concept of Advance Class Programming .


• Object-oriented programming involves determining object relationships.
• This includes creating classes with variables or properties that can hold references to other
objects.
• Two common types of relationships are containment (aggregation) and inheritance.
• Containment is a relationship where one class contains another class as a part of its data
members.
• For example, a Product object may contain a ProductFamily object or a Car object may
contain four Wheel objects.
• In ASP.NET programming, there are special classes called collections, which serve the
purpose of grouping various objects together.
• Collections allow you to store multiple objects and provide methods for adding, removing,
sorting, and retrieving them.
• But this approach has advantage and disadvantage .it makes it easier to add and remove
items from the list but it also removes a useful level of error checking , because it support
any type of object.
• This issue can be very well solved by generics. The use of generics can address the issue of
collections supporting any type of object. Generics allow you to define classes that can work
with different types, providing type safety and enabling better error checking when working
with collections.
• In addition to containment, classes can have a different type of relationship known as
inheritance. Inheritance allows a class to inherit the properties and behaviors of another
class, promoting code reuse and hierarchy in object-oriented designs.

Q5. What is .NET ? Explain in details.


• .NET is a free, open-source, cross-platform framework developed by Microsoft that provides
a platform for building, deploying, and running various types of applications.
• It allows developers to create applications for web, desktop, mobile, gaming, cloud, Internet
of Things (IoT), and more.
• Cross Platform:- Whether you're working in C#, F#, or Visual Basic, your code will run
natively on any compatible operating system. You can build many types of apps with .NET.
Some are cross-platform, and some target a specific set of operating systems and devices.
• One consistent API:- .NET provides a standard set of base class libraries and APIs that
are common to all .NET applications. Each app model can also expose additional APIs that
are specific to the operating systems it runs on. For example :.NET Framework is windows
only.
• Libraries:- To extend functionality, Microsoft and others maintain a healthy .NET package
ecosystem. NuGet is a package manager built specifically for .NET that contains over 100,000
packages.
• Application models:-you can build any types of app with .NET such as web application ,
desktop application , mobile application , cloud , gaming etc.

Q6. What is Managed Code ? Explain with respect to CLR.


• The code which are developed in .NET Framework is known as managed code.
• This code is directly executed by common language runtime (CLR) with the help of managed
code execution.
• Managed code use CLR which is used in your application with feature of cross language
integration , cross language exception handling , enhanced security , versioning and
deployment support , cross -language debugging and so on.
• Managed code is written in one of the high-level languages that can be run on top of .NET,
such as C#, Visual Basic, F# and others. When you compile code written in those languages
with their respective compiler, you don't get machine code.
• Managed code is code that is compiled to an intermediate language (IL) by the language
compiler (e.g., C# compiler). When you run a .NET application, the CLR reads this IL code and
executes it on the target machine.
• The CLR allows managed code to be platform-independent. Since the IL code is not specific
to any hardware or operating system, it can be executed on any platform that has a
compatible implementation of the CLR.
• During the compilation of managed code, the language compiler emits metadata containing
crucial information about types, members, and references used in the code.
• The CLR uses this metadata to understand the structure and behavior of the code during
runtime execution.
• managed code runs within the CLR, applications can be easily ported and executed on
various platforms without the need for major modifications or recompilation.

Q7.Discuss .NET vs .NET Framework.


• NET: .NET is a cross-platform, open-source framework that includes .NET Core, ASP.NET Core,
and Xamarin. It is designed to be modular and platform-independent.
• .NET Framework: .NET Framework is a Windows-only framework that includes the full
Common Language Runtime (CLR) and the Base Class Library (BCL). It is not cross-platform.
• NET: .NET is cross-platform, meaning you can run .NET applications on Windows, macOS, and
Linux.
• .NET Framework: .NET Framework is limited to Windows operating systems and does not
support macOS or Linux.
• .NET: .NET is open-source and actively developed on GitHub.
• .NET Framework: .NET Framework is not open-source.
• .NET: .NET applications can be deployed as self-contained executables, meaning they can
include all the necessary dependencies, making deployment easier.
• .NET Framework: .NET Framework applications require the target machine to have the
appropriate version of the framework installed, which may cause deployment challenges
• NET: .NET supports modern language features and enhancements, and new language
features are introduced in C# and other languages targeting .NET.
• .NET Framework: While .NET Framework supports C# and VB.NET, it does not receive the
same level of language feature updates as .NET.
• NET: .NET APIs are cross-platform and consistent across different platforms, simplifying
development and portability.
• .NET Framework: .NET Framework APIs are specific to Windows and might not be available
on other platforms.

Q8. Create an application to demonstrate the following


application
I. Fibonacci Series .
Program:-
using System;

namespace Febonacci

class Program

static void Main(string[] args)

int previous = -1; int next = 1;

int position;

Console.Write("\nEnter the position - ");

position = int.Parse(Console.ReadLine());

Console.Write("\nFibonacci Series - ");

for (int i = 0; i < position; i++)

int sum = next + previous;

previous = next;
next = sum;

Console.Write(next + " ");

Console.ReadKey();

II. Prime Number.


Program:
using System;

namespace PrimeNumbers

class Program

static void Main(string[] args)

int number;

Console.Write("\nEnter the number - ");

number = int.Parse(Console.ReadLine());

int i;

for (i = 2; i < number; i++)

if (number % i == 0)

Console.WriteLine("\n THis is not a prime number", number);

break;

}
}

if (i == number)

Console.WriteLine("\nThis is a prime number", number);

Console.ReadKey();

Q9. Write a program to implement the concept of Delegate.


Program :-
using System;

namespace DelegateProgram

delegate int ArthOp(int x,int y);

class MathOp

public static int Add(int a ,int b)

return (a+b);

class Program

static void Main(string [] args)

ArthOp Am = new ArthOp(MathOp.Add);

// delegate invocation

int result1 = Am(100,200);


Console.Write("Result 1: "+result1);

Console.ReadKey();

Q10. What are Assemblies ? Explain in details.


• All the .NET classes are contained in a assemblies.
• Assemblies are the physical file that contain compile code .
• Typically assembly files have the extension .exe if they are stand alone application or .dll if
the are reusable component .
• A strict relationship doesn’t exit between assemblies and namespaces . An assembly can
contain multiple namespaces.
• Conversely , more than one assembly can contain classes of same namespace .
• Namespaces are logical way to group classes . However assemblies are physical package for
distributing code.
• By default , a wide range of .NET assemblies is automatically made available to ASP.NET
application.
• If you need to use additional assemblies , you need to define them in a configuration file for
your website .

Q11. Explain the need of .NET.

You might also like