Path.GetDirectoryName(Application.ExecutablePath); will return the current directory in windows service. To work above code you need to add one dll reference System.Windows.Forms.dll. Some developers tries Directory.GetCurrentDirectory(), which actually returns C:\Windows\System32.
Some of the interviewer’s favourate question or we can say common interview question is What is Lazy Loading in C#.Net and when to use it Lazy Loading in C#.Net Lazy loading is the concept in which we delay the loading of the object until the point where we need it. In simple terms loading the objects on… Read More »
Once, we had one situation where foreach loop is used to loop though data rows in datatable and we were marking DB call though that loop. [Calling DB functions inside loop is not good practice, but that code was very old and we just wanted to improve some performance.] but we wanted Parallel foreach on DataTable.… Read More »
How to fix destination folder already exists in wordpress for plugin This error ‘Destination folder already exists in wordpress’ usually comes while installing any plugin or theme. In this article, we will show you how to fix destination folder already exists error in WordPress. Reason for getting this Error: This error comes due to same folder… Read More »
If interested Kindly do send mail to Jatinnahar15@gmail.com
1) Press CTRL+h to open Replace word window. 2) Type \\r\\n in “Find what” and \r\n in “Replace with”. 3) Finally, select search mode Extended (\r, \n, \t, \x…, \0) and click “Replace All”.
When to use abstract class and when to use interface This question can be asked in many different ways, situation/scenario when to choose one over another. Abstract Class can be used in situation: When you want to declare feilds and assign default value to it, go for abstract class over interface. For E.g.: When i… Read More »
Inheritance in C# With Example? Let’s start with the concept Inheritance in C# with example, Inheritance is the concept in which one type (class/interface) derives data member and member functions from another type is called as inheritance. The type which derives the members from another type is called as derived type and the type from… Read More »
Advantage of abstract class over Interface in C#.Net Adding new functions/methods to existing interface is difficult as compared to adding it to abstract class. If you want to add a new functions/methods to existing interface, you must have to implement the new functions in all of the classes that implement the changed interface. The code… Read More »
Abstract Class Vs Interface in C#.Net Abstract Class Vs Interface in C#.Net Memebers Allowed Abstract as well as non abstact allowed. Only abstract members are Allowed. Implementation of methods in derived classes Not necessary to implement all the methods of base (abstract) class for derived classes. The derived class must implement all the methods of… Read More »