Definitions of C#

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Various Definitions in C#

1. What is difference between .net and C#?


C# is a strong Object Oriented programming language that is mostly built on the .NET
framework. ...
C# is a language,

.NET is an application framework.


The .NET libraries can run on the CLR and thus any language which can run on the CLR
can also use the .NET libraries.
----------------------------------------------------------------------------------------------------------
2. What are the main components of the .NET framework?
There are 4 main components of .Net Framework.
 CLR(Common Language Runtime)
 CTS(Common type system)
 BCL(Base Class Library)
 CLS(Common Language Specification)
-------------------------------------------------------------------------------------------
3. What is meant by common language?
Common Language Runtime (CLR) is programming that manages the execution of
programs written in any of several supported languages, allowing them to share common object-
oriented classes written in any of the languages.

----------------------------------------------------------------------
4. What is just in time compiler in C#?
.NET uses an Microsoft Intermediate Language (MSIL), sometimes abbreviated as IL. The
compiler reads your source code and produces MSIL. When you run the program, the .NET Just
In Time (JIT) compiler reads your MSIL code and produces an executable application in
memory.
---------------------------------------------------------------------------------

5. What is MSIL code?


Its bytecode is translated into native code or—most commonly—executed by a virtual
machine. CIL was originally known as Microsoft Intermediate Language (MSIL) during the beta
releases of the .NET languages. Due to standardization of C# and the Common Language
Infrastructure, the bytecode is now officially known as CIL.
----------------------------------------------------------------------------------

6. What is the common language specification?


A Common Language Specification (CLS) is a document that says how computer programs
can be turned into MSIL code. When several languages use the same bytecode, different parts of
a program can be written in different languages. Microsoft uses a Common Language
Specification for their .NET Framework.
-------------------------------------------------------------------------------------------
7. What is the function of CLR?
The main function of Common Language Runtime (CLR) is to convert the Managed Code
into native code and then execute the Program.
---------------------------------------------------------------------------------------

8. What is meant by native code?


Native code is computer programming (code) that is compiled to run with a particular
processor (such as an Intel x86-class processor) and its set of instructions.
If the same program is run on a computer with a different processor, software can be
provided so that the computer emulates the original processor.
--------------------------------------------------------------------------------------------------------

9. What do you mean by bytecode?


Programming code, once compiled, is run through a virtual machine instead of the
computers processor.
Bytecode is the compiled format for Java programs. Once a Java program has been
converted to bytecode, it can be transferred across a network and executed by Java Virtual
Machine (JVM).
------------------------------------------------------------------------------

10. What is a sandbox in computer terms?


In computer security, a sandbox is a security mechanism for separating running
programs. It is often used to execute untested code, or untrusted programs from unverified third
parties, suppliers, untrusted users and untrusted websites

--------------------------------------------------------------------------------
11. What is a sandbox in technology?
a sandbox is a security mechanism for separating running programs, usually in an effort
to mitigate (ease) system failures or software vulnerabilities from spreading.
sandboxes may be seen as a specific example of virtualization.
----------------------------------------------------------------------------------
12. What is a sandbox in Java?
The sandbox is a set of rules that are used when creating an applet that prevents certain
functions when the applet is sent as part of a Web page
-------------------------------------------------------------------------------------

13. How does a sandbox work?


Sandbox is a special security feature which allows you to run potentially suspicious
applications automatically in a completely isolated environment.
Programs running within the sandbox have limited access to your files and system, so
there is no risk to your computer or any of your other files
You can also use sandboxing to test code you will be distributing that will run in partially
trusted environments.
----------------------------------------------------------------------------------------
14. How do you create a sandbox?
To create a sandbox org:
1. From Setup, enter Sandboxes in the Quick Find box, then select Sandboxes.
2. Click New Sandbox.
3. Enter a name (10 characters or fewer) and description for the sandbox. ...
4. Select the type of sandbox you want. ...
5. Select the data to include in your Partial Copy or Full sandbox.
-----------------------------------------------------------------------------------------------
Sandbox in C#

PermissionSet ps = new PermissionSet(PermissionState.None);


// ps.AddPermission(new System.Security.Permissions.*); // Add Whatever Permissions you
want to grant here

AppDomainSetup setup = new AppDomainSetup();


Evidence ev = new Evidence();

AppDomain sandbox = AppDomain.CreateDomain("Sandbox",


ev,
setup,
ps);

sandbox.ExecuteAssembly("ManagedAssembly.exe");

You might also like