Containment is the replacement of inheritence,no no if inheritance isn’t the right choice,then the answer is containment, also known as aggregation. Rather than saying that an object is an example of another object, an instance of that other object will be contained inside the object. So,instead of having a class look like a string, the class will...
How to handle generic errors in WinApp using C# ?
Pass your exception or error through catch block to this method this will catch your error and show the messagebox regarding that error.Method which take error exception as a parameter and handle that error.public static void LogError(Exception ex){string sourceName = "Application Name";int errorCode = "99";string message = "The application encountered...
What is interface and why we implement interfaces ?
Interface defined by using interface keyword .In visualstudio you can directly add class as a interface its not a class it behaves as a template of the class. Interfaces describe a group of related functionalities that can belong to any class or struct.Interfaces are provided in C# as a replacement of multiple inheritance because C# does not support...