Monday 14 July 2014

C#.Net Basics: What is class? How to Declare a Class?

  • class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and Events.
  • A class is like a blueprint. It defines the data and behavior of a type.
  • If the class is not declared as static, client code can use it by creating objects or instances which are assigned to a variable.
  • The variable remains in memory until all references to it go out of scope. At that time, the CLR marks it as eligible for garbage collection.
  • If the class is declared as static, then only one copy exists in memory and client code can only access it through the class itself, not an instance variable. 
  • Unlike  structs Classes support inheritance , a fundamental characteristic of object-oriented programming.
  • Classes are declared by using the class keyword,
  • The class keyword is preceded by the access level. The name of the class follows the class keyword.
  • The remainder of the definition is the class body, where the behavior and data are defined.
  • Fields, properties, methods, and events on a class are collectively referred to as class members.

             Access level class Customer
  {
    //Fields, properties, methods and events go here...
  }


 http://msdn.microsoft.com/en-us/library/x9afc042.aspx

Sunday 13 July 2014

C# .Net OOPS Basics: Classes and Objects.

The terms class and object are sometimes used interchangeably, but in fact, classes describe the type of objects, while objects are usable instances of classes. 

So, the act of creating an object is called instantiation. 

Using the blueprint analogy, a class is a blueprint, and an object is a building made from that blueprint.


Class

class SampleClass
{

}

Object of SampleClass  :

SampleClass objSampleClass= new SampleClass();


For more details: http://msdn.microsoft.com/en-IN/library/dd460654.aspx

.Net Frequently asked questions for 4+ Years of experience having the skills C# .Net, OOPS Concept, ASP.Net and WCF

  1. What is sequence of code in retrieving data from database?
  2. What is about DTS package?
  3. What provider ADO.net use by default?
  4. Where does web.config info stored? Will this be stored in the registry?
  5. How do you register the dot net component or assembly?
  6. What is the Difference between asp and asp.net
  7. Which is stateless asp or asp.net?
  8. How many types of Authentication mechanisms are there in dot net?
  9. What is the State management in asp.net?
  10. Which Types of values mode can hold session state in web.config?
  11. Explain in detailed about Web Service?
  12. What is Http handler?
  13. What is view state and how this can be done and was this there in asp?
  14. How many Types of optimizations are there and name a few and how do you do?
  15. Explain about Data Adapters?
  16. Explain the Features of a Dataset?
  17. How do you do role based security?
  18. What is the Difference between Responses.Expires and Expires.Absolute?
  19. How many Types of object are there in .Net?
  20. Explain about duration in caching technique?
  21. Explain about types of configuration files and their differences?
  22. What is the Difference between ADO and ADO.net?
  23. Explain in detail about Post back?
  24. If you are calling three SPs from a window application how do u check for the performance of the SPS


SQL Server Frequently asked questions for .Net Programmers

  1.  What is normalization In SQL Server? 
  2.  What is an index and types of indexes? How many numbers of indexes can be used per table in SQL Server?
  3.  What is a constraint? How many Types of constraints are there in SQL Server?
  4. What are code pages in SQL Server?
  5. What is referential integrity in SQL Server?
  6. What is a trigger? How many types of triggers are there in SQL Servr?
  7. What are different types of joins in SQL Server?
  8. What is a self join and Give an Example in SQL Server?
  9. Explain Authentication mechanisms in Sql Server?
  10. What are the user defined stored procedures?
  11. What is INSTEAD OF trigger in SQL Server?
  12. How to optimize a query that retrieves data by joining 4 tables?
  13. What is the Usage of DTS in SQL Server?
  14. How to disable an index using select query in SQL Server?
  15. Is non-clustered index faster than clustered index? Why?
  16. Explain different types of optimization in queries?
  17. What is the difference between ISQL and OSQL in SQL Server?
  18. How you log an exception directly into Sql server what is used for this?
  19. Explain about Replication in Database?
  20. What is the default optimization done in oracle and Sql server?
  21. How can I make a column as unique in SQL Server?
  22. How many no of tables can be joined in same SQL Server?
  23. How many columns can exist per table in SQL Server?
  24. Explain about Sql Profiler usage in SQL Server?

.Net Frequently asked questions having the skills C# .Net, OOPS Concept, ASP.Net and WCF

  1. What is the Difference between asp and Asp.net?
  2. How do you do exception management?
  3. If you are using components in your application, how can you handle exceptions raised in a component?
  4. Can we throw exception from catch block?
  5. How do you relate an aspx page with its code behind page?
  6. What are the types of assemblies and where can u store them and how?
  7. What is difference between value and reference types?
  8. Is array reference type / value type?
  9. Is string reference type / value type?
  10. What is web.config. How many web.config files can be allowed to use in an application?
  11. What is difference between machine.config and web.config?
  12. What is shared and private assembly?
  13. What are asynchronous callbacks?
  14. How to write unmanaged code and how to identify whether the code is managed / unmanaged?
  15. How to authenticate users using web.config?
  16. What is strong name and which tool is used for this?
  17. What is gacutil.exe. Where do we store assemblies
  18. should sn.exe be used before gacutil.exe?
  19. What does assembly info.cs file consist of?
  20. What is boxing and unboxing?
  21. How many Types of authentications are there in ASP.NET?
  22. What is the difference between Trace and Debug?
  23. What is the Difference between Dataset and Data Reader?
  24. What is custom tag in web.config?
  25. How do you define authentication in web.config?