Tag: C#
Async and Await in C#
Asynchronous programming has become increasingly important in modern software development, and C# has been at the forefront of this trend. One of the key features of C# that make asynchronous programming easier is the async and await keywords. In this
Explain the Server Session State pattern with an example in C Sharp
Server Session State is a design pattern used in web applications to maintain the state of a user’s session on the server side. This means that instead of storing the session state on the client side (e.g., in cookies), the
Null Object Pattern in C#
The null object pattern is designed to handle the null exception of objects without implementing too many null checks in the application. This is done by identifying the behaviour that should occur when a null is encountered and declaring a
Code Optimization in C#
What is Optimization? The word Optimization is derived from the Latin word Optimal which means the best. Optimization is a methodology of making a system or decision fully perfect, functional, and effective. Now, what is code Optimization? In terms of
How to remove a property from Json in C#
Description: Suppose we have the following JSON data and we want to remove the property “RunIsolated” (highlighted) under the compositeRequest to get the final JSON without this property: Solution for Json: Following is the sample code to achieve this: string
Dependency Injection in C Sharp
To understand the term Dependency Injection, we must know what is Dependency and IoC? In terms of Object-Oriented Programming, Suppose Class A uses Class B for one of its jobs. Here Class B is a dependency of Class A and
How to get Attachments from Salesforce using API in C#
Description: The code below shows how we can get Salesforce attachments from various objects and save them to a particular folder on a local disk. This is the complete code to get all attachments saved in all Contact objects in
Diagnostics in the C# Programming
The System. Diagnostics namespace provides a process class which has some method to run external .exe or another application into a C#. This also enables you to debug and trace code; start, stop, and kill processes; monitor system performance; and
Exceptions in C#
An exception is an unexpected or unwanted event that occurs when a program is executed i.e at runtime, that disrupts the normal flow of the program’s instructions. Sometimes while executing the program, a user might face the possibility that the