Posts by Solomon
C# OOPS Interview Questions
0Collected from the Internet:
Class Questions 1.What is the syntax to inherit from a class in C#? Ans.Place a colon and then the name of the base class. Example: class MyNewClass : MyBaseClass 2. Can you prevent your class from being inherited by another class? Ans.Yes. The keyword "sealed" will prevent the class from being inherited. 3.Can you allow a class to be inherited, but prevent the method from being over-ridden? Ans.Yes. Just leave the class public and make the method sealed. 4.What’s an abstract class? Ans.A class that cannot be instantiated. An abstract class is a class that More >
C# Interview Questions #2
0Collected from the Internet:
1.Does C# support multiple-inheritance? Ans. No! It may be achieved however, using interfaces. 2.Who is a protected class-level variable available to? Ans.It is available to any sub-class (a class inheriting this class). 3.Are private class-level variables inherited? Ans. Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited. 4.Describe the accessibility modifier "protected internal". Ans. It is available to classes that are within the same assembly and derived from the specified base class. 5.What’s the top .NET class that everything is derived from? Ans.System.Object. 6. What More >
C# Interview Questions #1
1Collected from the Internet:
What does the modifier protected internal in C# mean? The Protected Internal can be accessed by Members of the Assembly or the inheriting class, and of course, within the class itself. In VB.NET, the equivalent of protected internal is protected friend. The access of this modifier is limited to the current assembly or the types derived from the defining class in the current assembly.
Can multiple data types be stored in System.Array? So whats an array all about? An array is a collection of items of the same type, that is grouped together and encompassed More >
SQL Server – Interview Questions #2
0Database design
What is denormalization and when would you go for it? As the name indicates, denormalization is the reverse process of normalization. It’s the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could be reduced.
How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships. Many-to-Many More >
SQL Server – Interview Questions #1
01. What are the different types of Joins? Ans. Joins as used to combine the contents of two or more tables and produce a result set that incorporates rows and columns from each table. Tables are typically joined using data that they have in common Join conditions can be specified in either the FROM or WHERE clauses; specifying them in the FROM clause is recommended. WHERE and HAVING clauses can also contain search conditions to further filter the rows selected by the join conditions.
Joins can be categorized as:
Inner joins – (the typical join operation, which uses some More >
String.Format Method
0-
http://msdn.microsoft.com/en-us/library/system.string.format.aspx
-
http://msdn.microsoft.com/en-us/library/fht0f5be(VS.80).aspx
-
http://msdn.microsoft.com/en-us/library/26etazsy(VS.80).aspx
Integer
Add zeroes before number
1: String.Format("{0:00000}", 15); // "00015"
2: