How to achieve abstraction in C# -oops

Learn how to provide necessary information to the users and hide the unnecessary details using C# programs. The concept of “providing necessary details to the clients/users and hiding the unnecessary details” is called Abstraction. As an example consider a login page where username and password is enough for the users. so, only username and password … Read more How to achieve abstraction in C# -oops

What is Encapsulation in C# – Best Answer

Answer includes concept of encapsulation in C# oops with various C# encapsulation examples with programs. Answer:Encapsulation in C# is one of the oops principles that is used for hiding complexities in programs. NOTE: Many candidates answer to this interview question “What is encapsulation in C#” like wrapping the class member fields into a method as … Read more What is Encapsulation in C# – Best Answer

How to compare two arrays in C# if they are Equal or Not.

How to compare two arrays in C# if they are equal or not using 2 methods with code example. By Comparing each corresponding element of both the arrays. Using SequenceEqual() method. Two arrays will be called equal if both the arrays have same corresponding elements and same number of elements. Comparing each element of both … Read more How to compare two arrays in C# if they are Equal or Not.

Write code for interface implementation in C#

Answer includes the concept for interface implementation in C# with example and code example of multiple interface implementation. Answer: C# Interface inheritance or implementation is a simple concept object oriented programming. Let’s understand in a simple word.  We create an interface having one or more unimplemented methods in it. A class implements this interface, meaning, … Read more Write code for interface implementation in C#

What is Static class in C#? Explain with example and USE

Answer includes concept of static class in C# with example program. also,  why we use static classes with important points will be described. In simple word, when we want to keep only static methods and static variables in the class then we create a static class. There should not be any non-static member field in … Read more What is Static class in C#? Explain with example and USE

Proof that string is immutable in C# Programming

We know that string is immutable in C# programming and cannot be modified or changed. You can read detail of mutable and immutable string in C#. Let’s proof the string immutability with program example  and source code using object memory references. In below C# program, first we’ll check the reference of memory of  strings s1 … Read more Proof that string is immutable in C# Programming

What is C# mutable string and immutable string?

C# mutable string and immutable string is, in fact very simple concept and  you will understand with example.  The immutable meaning is unchanging over time or unable to be changed. The mutable meaning is changeable or modifiable. Immutable String in C# Immutable string cannot be changed once declared and defined. In a simple word, if … Read more What is C# mutable string and immutable string?