Welcome to www.programmer2programmer.net tips for IT Interview Questions of .NET .NET Object-Oriented Programming (OOPs)

programmer2programmer.net

 Tips
 Microsoft Certification
 Final Year Project Idea
 Connection Strings
 Password Recovery
 SQL Injection
 Encryption & Decryption
  
 LIVE Academic Project
 Project #1 - VB6, Access
  Project #2 - VB.Net, SQL
 Project #3 - ASP, Access
 Project #4 - ASP.NET, C#
 Project #5 - VB6, SQL
 Project #6 - Stegano
 Project #7 - C
 Project #8 - C++
 Project #9 - JAVA, MySQL
 Project #10- PHP, MySQL
 Project #11- JSP, Oracle
 Project #12- C# Face Exp
 Project #13- Mobile Bank
 Download MBA Project
 MBA Project Topic
 Project Viva Question
  2017 New Projects
 Project Synopsis Download
  
 University Question Paper, Assignment and Projects
 SMU - Question Paper
 SMU - Assignment
 SMU - Synopsis Projects
 SCDL - Assignment
 IGNOU - Synopsis Projects
 Welingkar - Projects
 Project Report Formats
  
 Interview Question Answer
 General & HR Round
 Visual Basic 6
 VB.Net & C#
 ASP.Net
 SQL Server
  Oracle and DBA
 My SQL
  

100% Tested
Ready Academic IT Projects

BE, ME, BTech, BCA, MCA, MBA, Bsc-IT, MS, BIT, ADIT, DOEACC, IGNOU, SMU
readymadeproject.com

 Interview questions and Answers for .NET Object-Oriented Programming (OOPs), Class, Inheritence,

Home Personal Member Forum Source Project Tips Contact
 

Interview Question - VB.NET and C# - .NET Object-Oriented Programming (OOPs)

Interview questions and answers for .NET Object-Oriented Programming (OOPs)

.NET Object-Oriented Programming (OOPs), Enums, Properties, Method, event, Delegate, Class, Object, Inheritance, Abstract Class, Interface, Overloading, Polymorphism, arrays and collection, encapsulation, shadowing and overriding, must inherit, dispose, constructor, destructor, dispose, access modifier.

Advanced .NET Framework OOPs Interview Question and Answers

Interview Question, Answer
1.  Programming General
2.  Web General
3.  Database General
4.  Visual Basic 6
5.  ASP
6.  Visual Basic .NET and C#
7.  ASP .NET
8.  ORACLE
9.  MS SqlServer
10. MySql
11. COM, DCOM
1. Explain when a type conversion will undergo an implicit cast and when you must perform an explicit cast. What are the dangers associated with explicit casts?
Types can be implicitly converted when the conversion can always take place without any potential loss of data. When a potential loss of data is possible, an explicit cast is required. If an explicit cast is improperly performed, a loss of data precision can result, or an exception can be thrown.
 
2. Explain why you might use enums and constants instead of their associated literal values.
Enums and constants make code easier to read and maintain by substituting human-legible tokens for frequently used constant values.
 
3. Briefly summarize the similarities and differences between arrays and collections.
  Arrays and collections allow you to manage groups of objects. You can access a particular object by index in both arrays and collections, and you can use For Each…Next (foreach) syntax to iterate through the members of arrays and most collections. Arrays are fixed in length, and members must be initialized before use. Members of collections must be declared and initialized outside of the collection, and then added to the collection. Collections provided in the System.Collections namespace can grow or shrink dynamically, and items can be added or removed at run time.
 
4. Explain how properties differ from fields. Why would you expose public data through properties instead of fields?
Properties allow validation code to execute when values are accessed or changed. This allows you to impose some measure of control over when and how values are read or changed. Fields cannot perform validation when being read or set.
 
5. Explain what a delegate is and how one works.
  A delegate acts like a strongly typed function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods.
 
6. Briefly explain how to convert a string representation of a number to a numeric type, such as an Integer or a Double.
All numeric data types have a Parse method that accepts a string parameter and returns the value represented by that string cast to the appropriate data type. You can use the Parse method of each data type to convert strings to that type.
 
7. What are the two kinds of multidimensional arrays? Briefly describe each.
  Multidimensional arrays can be either rectangular arrays or jagged arrays. A rectangular array can be thought of as a table, where each row has the same number of columns. Rectangular arrays with more than two dimensions continue this concept, where each member of each dimension has the same number of members of each other dimension. Jagged arrays can be thought of as an array of arrays. A two-dimensional jagged array is like a table where each row might have a different number of columns.
 
8. Briefly explain encapsulation and why it is important in object-oriented programming.
  Encapsulation is the principle that all of the data and functionality required by an object be contained by that object. This allows objects to exist as independent, interchangeable units of functionality without maintaining dependencies on other units of code.
 
9. What is method overloading, and when is it useful?
  Method overloading allows you to create several methods with the same name but different signatures. Overloading is useful when you want to provide the same or similar functionality to different sets of parameters.
 
10. You need to create several unrelated classes that each exposes a common set of methods. Briefly outline a strategy that will allow these classes to polymorphically expose that functionality to other classes.
  Factor the common set of methods into an interface, and then implement that interface in each class. Each class can then be implicitly cast to that interface and can polymorphically interact with other classes.
 
11. What is Interface?
  An interface is a contract. Any object that implements a given interface guarantees to provide an implementation of the members defined in that interface. If an object requires interaction with a specific interface, any object that implements that interface can supply the requisite interaction.
 
12. Describe an abstract class and explain when one might be useful.
  An abstract class is a class that cannot be instantiated but must be inherited. It can contain both implemented methods and abstract methods, which must be implemented in an inheriting class. Thus, it can define common functionality for some methods, a common interface for other methods, and leave more detailed implementation up to the inheriting class.
 
13. What is abstract members?
 

abstract members A member of a base class that cannot be invoked, but instead provides a template for members of a derived class. In Visual Basic .NET, abstract members are declared using the MustOverride keyword. In Visual C#, abstract members are declared using the abstract keyword.
 

14. What is base and derived class?
 

base class A class that provides properties and methods as a foundation for a derived class. In objected-oriented programming, one class can be based on another through inheritance. Using this technique, the base class provides characteristics (such as properties and methods) to a derived class. The derived class can reuse, modify, or add to the members of the base class

derived class A class that is based on another class (called a base class) through inheritance. A derived class inherits the members of its base class and can override or shadow those members.
 

15. What is encapsulation ?
Encapsulation In component programming, separating the implementation of a component from the interface. Only the public interface of a component is made accessible to the rest of the application. Component data should never be accessible to outside callers.
 
16. What is namespace?
Namespace A logical organization of types that perform related functions.
 
17. What is polymorphism  ?

Polymorphism The ability of classes to provide different implementations of the same public interface. Thus, two classes that exhibit polymorphism might contain different implementations, but because the interfaces are identical, they can be treated the same in code.
 

Next  ADO.NET interview questions and answers            Go back to Interview Question Main

(C) Atanu Maity, 2006-2017