#dotnetdemo
Explore tagged Tumblr posts
Photo

Attend for #freedemo on #dotnet course on 5th Sep @9AM. #kosmiktechnologies Register for a free demo: http://bit.ly/2KKDgEO #demo #dotnetdemo #besttraininginstitutes #softwaretraining #dotnetdeveloper #dotnetjobs #dotnetserver #dotnetengineer #dotnetinstituteinhyderabad #Hyderabad #andhrapradesh #kerala #kondapur #hitechcity #gachiibowli #kolkatta #bangalore #banjarahills https://www.instagram.com/p/CEjYLefnHtI/?igshid=2dxwhu5g482o
#freedemo#dotnet#kosmiktechnologies#demo#dotnetdemo#besttraininginstitutes#softwaretraining#dotnetdeveloper#dotnetjobs#dotnetserver#dotnetengineer#dotnetinstituteinhyderabad#hyderabad#andhrapradesh#kerala#kondapur#hitechcity#gachiibowli#kolkatta#bangalore#banjarahills
0 notes
Text
Interview Questions For Experienced and Beginner .NET Professionals Series Part 1
New Post has been published on https://is.gd/jTzmSy
Interview Questions For Experienced and Beginner .NET Professionals Series Part 1
What is IL code, CLR, CTS, CLS, JIT ?
How Exactly Dot Net application compiles and Run?
We write our code in C# or VB.net
Then we compile our program then the compiler will convert our C# or VB.Net program into half compile code i.e IL (Intermediate Language ).
When you click on Exe .net execution engine start then CLR gets this half compile code and gives to JIT
A machine can’t understand Intermediate code so JIT goes line by line and convert half compile code into machine-specific instruction.
Finally, your application executed.
Compilation and Execution Process Of Dot Net Application
IL Code- Intermediate Language
This code used in .net framework to generate machine-independent code as an output of the compilation.
(adsbygoogle = window.adsbygoogle || []).push();
It is CPU independent half compile code.
Why we need half compile code and why not in one go it convert to machine-specific instruction?
When we creation application we don’t know which windows version is installed in client machine like window XP, windows vista, window 9,10 like that. Also at the time of development, we don’t know the CPU configuration and other machine details.
IL Code in .Net
CLR (Command Language Runtime)
It is the heart of the .Net framework after the compilation process CLR plays the main role in running your application
Garbage collection
Class Load
CAS code access and code verification
Gives IL code to JIT
CTS (Common Type System)
In .net framework umbrella, there are so many languages present and there might be condition code in one language you need to access in another language so there is a need for smooth communication between these languages we need a common type system.
The common type system ensures that the data type defined in 2 different languages gets compiled into one common type.
Suppose you declared an int variable in c# and integer in VB.net then when it compiles into IL code both variables are compiled into int32. This is CTS.
CLS (Common Language Specification)
It is a subset of CTS. It is a specification and whatever language you used should follow the common specification. It is guidelines that specify if it follows guidelines given by .net framework then it will easily be consumed by .net support language.
How you define your code is CLS compliance?
First, go to assembly.info class and add a tag [assembly: CLSCompliant(true)] it means CLS compliant is enabled for this assembly. This is used when you write code and compiles that code then if it doesn’t follow the compliance then it will throw a warning.
JIT (Just In Time)
JIT translates the MSIL code of an assembly into native code and for that, it uses the CPU architecture of the target machine. There are different types of JIT
Pre JIT
Econo JIT
Normal JIT
Pre JIT
In a single run it will translate all source code into native code. It is done at the time of deployment and in .net it is called “Ngen.exe”.
Ngen.exe
ngen.exe install
The above command is will convert your application into machine language but conversion is as per machine specific.
Ngen stands for Native Image Generator.
Econo JIT
It will compile only those methods which are called at run time and after execution, it will remove from memory. It mainly used in mobile applications.
Normal JIT
It compiles only those methods which are called at run time. When the first-time compilation is done it is saved in cache memory. If you again call this method it will not compile this method rather than it will take from cache memory. When you run your application from windows normally it uses Normal JIT. To check this add .NET CLR JIT counters in performance counter and check value fluctuating.
GitHub Projects Link : – https://github.com/SagarJaybhay/DotNetDemos
(adsbygoogle = window.adsbygoogle || []).push();
2 notes
·
View notes
Photo

Free Online Training (.NET) 13th Aug @ 9:30 Am By Mr. Kannababu (Real Time Expert) Click here : https://bit.ly/2XTygSy Contact; 9100920092,9100940094 Website :https://www.sathyatech.com/online-schedules/ #DotNet #DotNetTraining #freecourse #onlinetraining #sathyatechnologies #software #training #education #learning #dotnetdemo #dotnetdeveloper #studentsupport #study #dontmissittwice #allindiastudents #bhoopal #mumbai #banglore #pune #dotnettraininginhyderabad #maharashtra #andhrapradesh #telangana #tamilnadu #kerala #students #studentsuccess #StudentSupport https://www.instagram.com/p/CD0CB5lHvSr/?igshid=1rqncp2od7ejg
#dotnet#dotnettraining#freecourse#onlinetraining#sathyatechnologies#software#training#education#learning#dotnetdemo#dotnetdeveloper#studentsupport#study#dontmissittwice#allindiastudents#bhoopal#mumbai#banglore#pune#dotnettraininginhyderabad#maharashtra#andhrapradesh#telangana#tamilnadu#kerala#students#studentsuccess
0 notes
Photo

Free Online Training (.NET) 13th Aug @ 9:30 Am By Mr. Kannababu (Real Time Expert) Click here : https://bit.ly/2XTygSy Contact; 9100920092,9100940094 Website :https://www.sathyatech.com/online-schedules/ #DotNet #DotNetTraining #freecourse #onlinetraining #sathyatechnologies #software #training #education #learning #dotnetdemo #dotnetdeveloper #studentsupport #study #dontmissittwice #allindiastudents #bhoopal #mumbai #banglore #pune #dotnettraininginhyderabad #maharashtra #andhrapradesh #telangana #tamilnadu #kerala #students #studentsuccess #studentsupport https://www.instagram.com/p/CDx48hsnBud/?igshid=1e2dg30qg25bt
#dotnet#dotnettraining#freecourse#onlinetraining#sathyatechnologies#software#training#education#learning#dotnetdemo#dotnetdeveloper#studentsupport#study#dontmissittwice#allindiastudents#bhoopal#mumbai#banglore#pune#dotnettraininginhyderabad#maharashtra#andhrapradesh#telangana#tamilnadu#kerala#students#studentsuccess
0 notes
Photo

Attend for #freedemo on #dotnet course on 15th August @9AM. Register for a free demo: http://bit.ly/2KKDgEO #demo #dotnetdemo #besttraininginstitutes #softwaretraining #dotnetmvc #dotnettraininginhyderabad #aspdotnetcore #aspdotnet #activeserverpages #kphb #kerala #haryana #gurgaon #mumbai #bangalore #hitechcity #gachibowli #chennai #softwareengineer #dotnetdeveloper #dotnetengineer https://www.instagram.com/p/CDtLXpeH7df/?igshid=1wlbwaj2rjkuf
#freedemo#dotnet#demo#dotnetdemo#besttraininginstitutes#softwaretraining#dotnetmvc#dotnettraininginhyderabad#aspdotnetcore#aspdotnet#activeserverpages#kphb#kerala#haryana#gurgaon#mumbai#bangalore#hitechcity#gachibowli#chennai#softwareengineer#dotnetdeveloper#dotnetengineer
0 notes
Photo

Attend for #freedemo on #dotnet course on 7th August @9AM. Register for a free demo: http://bit.ly/2KKDgEO #demo #dotnetdemo #besttraininginstitutes #softwaretraining #dotnettraininginhyderabad #dotnettraininginkukatpally #dotnettraininginkphb #traininginstitutesinhyderabad #training #kosmiktechnologies #kerala #kphb #kukatpally #dotnetdeveloper #dotnetengineer #dotnetdeveloper #chennai #dotnetmvc #telangana https://www.instagram.com/p/CDddIW0HHCc/?igshid=wwn7u5dv5nq5
#freedemo#dotnet#demo#dotnetdemo#besttraininginstitutes#softwaretraining#dotnettraininginhyderabad#dotnettraininginkukatpally#dotnettraininginkphb#traininginstitutesinhyderabad#training#kosmiktechnologies#kerala#kphb#kukatpally#dotnetdeveloper#dotnetengineer#chennai#dotnetmvc#telangana
0 notes
Text
What is Idisposable interface & Finalize Dispose pattern ?
New Post has been published on https://is.gd/O7TZmA
What is Idisposable interface & Finalize Dispose pattern ?
In this article we will understand what is the use of IDisposable interface and how Finalize Dispose pattern will implement in C# By Sagar Jaybhay.
(adsbygoogle = window.adsbygoogle || []).push();
Idisposable interface and Finalize Dispose pattern
Garbage collector only cleans managed code and if any unmanaged code it finds it doesn’t reclaim its memory so to remove unused objects we need something. In this case, at least we have a responsibility to call these kinds of which free unmanaged code objects. In C# application there is a place where we can manage these unmanaged objects and this place is a destructor.
But in Garbage collection destructor creates some problem which we solve by using an IDisposable Dispose pattern.
When I write destructor then more and more objects are created in Gen1 and Gen2 so which is not good in performance point of view.
Object creation On The Heap
In the above image, most of the objects are created in gen2. And code for this is below
public partial class Form1: Form public Form1() InitializeComponent(); private void button1_Click(object sender, EventArgs e) for (int i = 0; i < 1000000; i++) XYZ x = new XYZ(); MessageBox.Show("Completed"); class XYZ public int i get; set; public string str get; set; public void append() for (int i = 0; i < 1000; i++) str += i; ~XYZ()
In below class, we implement IDisposable pattern
public partial class Form1: Form public Form1() InitializeComponent(); private void button1_Click(object sender, EventArgs e) for (int i = 0; i < 0000001; i++) XYZ x = new XYZ(); x.Dispose(); MessageBox.Show("Completed"); class XYZ: IDisposable public int i get; set; public string str get; set; public void append() for (int i = 0; i < 1000; i++) str += i; ~XYZ() //release unmanaged objects Dispose(false); private void ReleaseUnmanagedResources() // TODO release unmanaged resources here protected virtual void Dispose(bool disposing) ReleaseUnmanagedResources(); if (disposing) public void Dispose() Dispose(true); GC.SuppressFinalize(this);
GC.SuppressFinalize(this);
This will suppress any kind of destructor and clean object.
GitHub Projects Link : – https://github.com/SagarJaybhay/DotNetDemos
(adsbygoogle = window.adsbygoogle || []).push();
0 notes
Text
Managed Unmanaged code Garbage Collector Generations
New Post has been published on https://is.gd/fQ5B9r
Managed Unmanaged code Garbage Collector Generations
What is the difference between Managed code and Unmanaged code Garbage Collector and Generations in C#?
In this article you will understand What is the difference between Managed code and Unmanaged code Garbage Collector and Generations in C#
(adsbygoogle = window.adsbygoogle || []).push();
Interview Questions Part 1 – https://sagarjaybhay.com/interview-questions-for-experienced-beginner-net-professionals-series-part-1/
Managed Code:
The code which runs under the control of CLR is called a managed code. The code which is written in the .NET framework is managed code.
Managed code uses CLR which looks after your applications by managing your application memory handling security and allow to call other application from managed code.
.Net framework ultimately called a managed code. For Managed code, CLR provides different services likes garbage collection, exception handling like that.
UnManaged Code:
The code which runs under its own runtime is called unmanaged code. It means the code which not runs under the control of CLR is called unmanaged code.
For example, an application written in C or C++ or java is called as unmanaged code on that CLR doesn’t have any control.
What is the Garbage collector and what his generation and different generation?
In CLR the GC garbage collector is present which serves the purpose for automatic memory management. It is a feature provided by CLR to free managed objects.
Automatic memory management is made possible by Garbage collection in .Net Framework. When we create a class object in our program the memory gets allocated on the heap.
When we no longer use that object garbage collector collects that object and free that memory.
Advantages garbage collector
No need to manually free the memory
It allocates the object on the managed heap
If Gc found that the object is no longer use then it will clear that memory and keep this memory available for future allocations.
When garbage collection occurs
Below is the condition when that satisfied GC will run.
If a system has low physical memory then garbage collection is necessary.
When the pre-set threshold is exceeded then garbage collection will occur.
When you call GC. Collect method then garbage collection will occur.
class Program static void Main(string[] args) demo d = new demo(); Console.WriteLine("Number of Generation Supporting "+ GC.MaxGeneration.ToString()); Console.WriteLine("Generation for this object " + GC.GetGeneration(d)); Console.WriteLine("Generation Total Memory " + GC.GetTotalMemory(true)); Console.Read(); class demo private int i = 0; private static string str = string.Empty; public void calculate() for (int i = 0; i < 100; i++) str += i * 1000;
In a background, GC thread is running continuously and it checks the generations whether or not an object is unused or not to reclaims its memory. It only cleans managed objects, outside CLR boundary it will not reclaim their memory.
Generation 0, Generation 1, Generation 2.
Why we need Generations?
Suppose we have a big application in that we are creating 1000 objects. So every time to check 1000 objects it’s cumbersome so what it did he creates the generation and which is generation 0, generation 1 and generation 2 and when first-time objects are created they are put in generation 0 bucket.
When second-time garbage collector thread runs then it will check which objects are required and which are not. If he finds 400 not required and 600 are actively required then these 600 objects he moves in next bucket which is generation 1 and then again when he check he find 200 required only and rest are not then 200 moves in next bucket and remaining are removed and garbage collector less likely to check the generation 2 bucket so performance automatically increases.
public partial class Form1 : Form public Form1() InitializeComponent(); private void button1_Click(object sender, EventArgs e) for (int i = 0; i < 1000; i++) XYZ x = new XYZ(); class XYZ public int i get; set; public string str get; set; public void append() for (int i = 0; i < 1000; i++) str += i;
Garbage Collector Generations
In the above image, we are able to see gen0 in that our object is available.
For this, we need to download the CLR profiler and from that CLR profile, you need to open your project EXE and then click on Objects by address button you can see the above image by doing this.
CLR Profiler Images
GitHub Projects Link : – https://github.com/SagarJaybhay/DotNetDemos
(adsbygoogle = window.adsbygoogle || []).push();
0 notes