User FAQs

If you have a question, please send it to us.


1) What does Strongly Typed mean ?
A programming language is strongly typed if there are no implicit type conversions.
A strongly typed programming language is one in which each data type is predefined as part of the programming language and all constants or variables must be defined with a specifc data type.
An advantage of strong data typing is that it imposes a rigorous set of rules on the programmer and therefore guarantees a certain consistency of results.


2) What is the difference between Procedural and Object Oriented programming ?
Procedural is based on a modular approach where a larger program is broken up into smaller procedures or functions.
Each procedure has a set of instructions that is executed one after another.
Access modifiers are not used in procedural programming which means that most of the code can be accessed from anywhere.
Object Oriented is based on classes which have methods and properties. Objects are then created from these classes.
Access modifiers can be used to hide implementation.
Inheritance can be used to create reusable components.


3) What is Object Oriented programming ?
This is a style of programming that is based on objects containing methods, properties and fields arranged in a hierarchy.
This type of programming is based around four key features:
Polymorphism - Create routines that can operate on objects of different types. This is handled by late binding and multiple interfaces.
Encapsulation - Hide parts of the implementation and hide complexity. This is achieved using access modifiers.
Inheritance (Interface) - (Public Inheritance) Define methods (without implementation) that must be declared in a derived class.
Inheritance (Implementation) - (Private Inheritance) Inherit method implementation from a base class.


4) Is C# a Strongly Typed programming language ?
Yes. C# and VB.Net are both strongly typed languages.


5) Is C# an Object Oriented programming language ?
Yes. It has the four key features outlined above.


6) Can you describe the four different types of inheritance ?
Single Inheritance - contains one base class and one derived class.
Hierarchical Inheritance - contains one base class and multiple derived classes with the same base class.
Multi-level Inheritance - contains a class derived from another derived class.
Multiple Inheritance - (not supported in C#) contains a class derived from multiple base classes.


7) Can you describe how Garbage Collection works ?
The garbage collector automatically gets information about unreferenced objects from the .NET runtime environment and then invokes their Finalize method.

GC.Collect 

8) Can you explain what an iterator is as well as an iterator block ?



9) What is Serialisation ?
Converting an object into a stream of bytes is called serialisation.
This is useful when we want to transport, save or pass an object around.
For an object to be serialized it needs to inherit the ISerialize interface.
De-serialization is the reverse process of creating an object from a stream of bytes.


10) What do the [Serializable] and [NonSerializable] attributes do ?

System.SerializableAttribute 
System.NonSerializableAttribute

[Serializable()]
public class MyClass

This can be applied to classes and methods.
Used to indicate that a class or method can be serialized.


11) What is the 'using' statement ?
The using block is used to obtain a resource and use it and then automatically dispose of it at the end of the block.
This allows you to not specify the data type at declaration ?


12) LINQ Question

.FirstOrDefault 

13) Write code that will resize a System.Drawing.Rectangle by reducing its height and width by 5 points ?

System.Drawing.Rectangle myRectangle = new System.Drawing.Rectangle(100,100); 
myRectangle.Inflate(-5,-5);

14) What is Unit Testing ?



15) Can you give some examples of different types of test cases ?
Positive test cases - correct data, correct output
Negative test cases - incorrect / missing / invalid data, proper handling
Exception test cases - exceptions are thrown and handled properly




© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext