Monday, September 10, 2012

More interview questions on C#.NET

.NET Framework

  • Explain the features of .NET Framework
  • Describe the .Net framework architecture. Explain the components of .Net framework, i.e. Common Language Runtime, Common type system, Type safety, Manage code execution, Side-by-side execution
Common language runtime (CLR)
  • What is common language runtime? Explain the component of CLR, i.e. Class loader, MSIL, Code manager, Garbage collector, Security engine, Type checker, Thread support, Exception manager, Debug engine, COM marshaler, Base class library.
  • How the Common Language Runtime Works
Execution of .Net application
  • Explain how a .Net application is compiled and executed.
  • Explain the components to ensure secure execution of code, i.e. Assembly loader, code verifier, Just-in-compiler (JIT).
  • Explain the types of JIT compilers, i.e. Standard JIT, Pre JIT, Econo JIT.
  • Define Assembly. Explain the role that they play in the .Net framework.
  • Describe the main components of an assembly, i.e. Manifest, Type Metadata, MSIL code and Resources
  • What are the features provided by assemblies?
  • How can we view content of an assembly?
  • What are the types of assemblies? Private and shared assembly
  • Describe the global assembly cache.
.Net Technologies
  • Explain the technologies of .NET Framework 3.0.
    - Windows Presentation Foundation (WPF)
    - Windows communication Foundation
    - Windows workflow Foundation
    - Windows Cardspace
Common Type system (CTS)
  • Explain C# CTS
  • Explain the collection of CTS types defined by .NET Framework, i.e. classes, structs, enums, interfaces, delegates
  • What are type categories defined by CTS? Explain them
  • Benefit of value types.
  • Value types vs. reference types
  • What are the type conversions in C#? Explain them
  • C# 3.0 includes a new feature called an implicitly typed variable. Explain it.
.Net base class library
  • What is .Net base class library?
  • Explain the difference between value types and reference types.
Configuration and security
  • Describe the configuration files in .Net. What are different types of configuration files in .Net framework? – Machine configuration, Machine .config file, Application configuration file, security configuration file.
Boxing and unboxing
  • .NET defines value types and reference types as two major groups of data types. What are they? Explain them with example.
  • Advantages amd Disadvantage of Boxing.
C# Methods
  • Depict code to show c# methods with explanation.
  • Explain the concept of ref and out parameters with an example.
  • C# supports the use of parameter arrays and params keyword. Explain with an example
  • Using C#.Net, create a new method using input and output parameters.
  • Third type of comment supported by C# is a documentation comment. What is that?
Access Level
  • Explain the difference between public, internal and private access levels.
  • Explain the use of static members with example using C#.NET
C# user defined data type
  • Define enum. Provide an example to explain it
  • Define struct. Provide an example to explain it
C# Array
  • Explain Single dimensional arrays. Show it in an example
  • Explain Multidimensional arrays. Show it in an example
  • Explain Jagged Array. Show it in an example
  • Show how to declare a 4 by 5, two-dimensional array of ints.
  • Show how to declare a jagged two-dimensional int array in which the first dimension is 5.
  • Show how to initialize a one-dimensional int array with the values 1 through 5.
C# Object oriented programming
  • What is an object?
  • Characteristics of an object, i.e. state, behavior, identity, responsibility
  • Explain the major pillar of object oriented system, i.e. Abstraction, Encapsulation and Inheritance
  • Explain polymorphism.
  • Explain the form methods that are used to control their lifetime. Form.Show, Form.ShowDialog, Form.Activate, Form.Hide, Form.Close.
  • What are method’s events? Explain each of them, i.e. load, activate/deactivate,closing,closed.
Controls and components
  • Explain how to set the control tab order in C#.Net.
  • What is docking and anchoring. Explain their use with controls.
  • Explain how to add controls dynamically to the form using C#.NET.
  • What are Extender provider components? Explain how to use an extender provider in the project.
  • Explain how to add a control to a form at runtime.
  • What are MainMenu components? Explain its role.
  • What is ContentMenu component?
  • Write code using C#.NET for the following
    Enable or disable a menu item.
    Create shortcut keys for menu item.
    Make menu items invisible.
    Add items to a menu.
    Clone a menu
C# class
  • What is a class?
  • What are data members and function members of a C# class?
  • What are the access modifiers of the members of a class? public, private, protected, internal and protected internal
  • What is a constructor?
  • Explain the features of constructors.
  • What is a destructor? Features of destructor.
  • What are indexers?
  • Properties vs. indexers
  • Static methods of class. Example
  • non-static methods of class - Example
  • Static vs. non static methods of a class
Method overloading
  • Define Method overloading. Provide an example and explain
  • Define Operator overloading. Provide an example and explain
  • What are operators that cannot be overloaded?
  • What are rules needs to be followed while overloading operators?
  • Define Exceptions.
  • Explain System.Exception class in C#.
  • Explain the categories of exceptions that exist under the base class Exception, i.e. SystemException class, ApplicationException.
  • Explain Exception handling in C# with an example.
  • Define some of the common Exception classes in C#.
Inheritance in C#
  • Define Inheritance. Provide an example to show implemantation of inheritance in C#.
  • What are the access specifiers in base class? i.e. private, public, protected, internal and protected internal
Polymorphism in C#
  • Define Polymorphism.
  • How do we achieve Polymorphism in C#? i.e. virtual function and inheritance
  • Define Shadowing in C#. Provide an example to show implemantation of Shadowing in C#
  • Sealed class. Provide an example to show implemantation of Sealed class in C#
  • Concrete class. Provide an example to show implemantation of Concrete class in C#
  • Abstract class. Provide an example to show implemantation of Abstract class in C#
  • Interface. Provide an example to show implemantation of Interface in C#
  • Features of interfaces.
  • Abstract class vs. interface
  • Cloning in C#.
  • Concept of shallow copy or a deep copy
C# collection
  • Define collections in C#.NET.
  • Explain the types of collections - Generic collection and non-generic collection.
  • Define collection interfaces.
  • Describe some of the collection interfaces
    IEnumeration interface
  • Advantages and disadvantages of Generic and non-generic classes
C# Delegates
  • Define Delegates
  • Explain the types of Delegates - unicast delegates and multicast delegates
  • Explain the steps in defining and using delegates in C#.
  • Single vs. Multicast Delegates
  • What is Asynchronous Delegates? Provide an example to show implemantation of Asynchronous Delegates in C#
  • Define Events. Describe how to implemant of an Event in C#.
  • Explain with an example of working of Eventhandler Delegates
  • Covariance and contravariance are used to enhance the Delegate behavior. Explain it
C# garbage collector
  • Automatic memory management in .NET is done by Garbage Collector (GC). Explain
  • Brief explanation of some of the garbage collector's methods
  • Explain implicit resource management using Finalize () method
  • Explain explicit resource management using Dispose method.
C# Reflection
  • Explain Reflection C#.
  • Define the situation in which Reflection is useful.
  • Can you explain how to use different classes in system.Reflection namespace to get the types defined in the assembly?
Input/Output in C#
  • Overview of the Stream based I/O in C#.
  • Explain the types of Streams.
  • Explain how to access files paths by using the Path class.
Serialization in C#
  • Define serialization and deserialization.
  • Describe how to serialize and deserialize obect by using BinaryFormatter and SoapFormatter class.
  • Describe how to Serialize and deserialize objects by using xmlSerializer class.
  • Explain the Types of Serialization.
XML in C#
  • What is XML? Characteristics of XML. Benefit of XML
  • What are the different components of XML and explain their usage.
  • Explain the core .Net XML classes.
  • Explaination with an example the uses of XMLReader and XMLwriter for accessinbg and writing XML data.
  • Features of ADO.NET
  • Explain the components that help in data access and data manipulation in ADO.NET - .Net data provider and Dataset
  • Explain different .NET data provider
    ODBC data provider
    OLEDb data provider
    Oracle data provider
    SQL Data Provider
  • Differentiate between connected and disconnected environment.
  • Describe how to connect to SQLServer database using connection object.
  • Describe how to create and use command object to query the database.
  • Describe how to use a DataReader object to read the data fetched from the database.
  • Describe how to call a stored procedure created in SQL server database to perform insert, update or delete operations.
C# COM interoperability
  • Managed and unmanaged code
  • CLR provides two mechanisms for interoperation with unmanaged code, i.e. Platform invocation services, COM interoperability. Explain them
  • COM components vs. .NET components.
C# Multithreading
  • Define multitasking and multi-threading
  • Explain different thread states in the life cycle of a thread
  • Write a simple multithreaded application
C# web services
  • What is a web services?
  • Features of web services
  • What are the building blocks of web services?
  • Define functionality of UDDI, DISCO, WSDL and SOAP.
  • Define a web method.
  • Write a simple code to create a simple web services
  • Explain the concept of SOAP
C# deploying .NET application
  • Describe deployment process in .NET
  • What are the deployment project templates provided by VS.NET?
  • Describe how to implement XCOPY deployment.
  • What does LINQ stand for? In general terms, what is its purpose?
  • As it relates to LINQ, what interface must a data source implement?
  • What are the query keywords that begin query clauses?
  • What query keyword is used to filter a sequence? Use it to rewrite your answer to question 5 so that it returns only those MyData objects whose Height property is less than 100.
  • What query keyword orders a sequence? Using your answer for question 6, sort the results into descending order based on the Height property.
  • What query keyword groups the result of a query organized into sequences? (In other words, what keyword returns a sequence of sequences?) Show its general form.
  • What keyword joins two sequences? Show its general form in the context of a from clause.
  • When using select or group, what keyword creates a continuation?
  • What keyword creates a variable that holds a value?
  • Show how to create an instance of an anonymous type that has two string properties called Title and Author.
  • What is the lambda operator? A lambda expression is one form of anonymous function. True or False?
  • What is the query method that corresponds to the where keyword?
  • What is an extension method? How must the first parameter be declared?
  • Why are extension methods important to LINQ?

No comments:

Post a Comment