1.) How do we inherit from a class in c# ? In c#, we use a colon (:) and then the name of the base class. 2.) Does c# support multiple inheritance ? No, we use interface for this purpose. 3.) Are private class -label variables inherited ? Yes, but it is not accessible.we generally know that they are inherited but not accessible. 4.) What is the implicit name of the parameter that gets passed into class "set" method ? Value and it's datatype(it depends whatever variable we are changing). 5.) What is the top .NET class ? System.Object 6.) How does method overloading different from overriding ? A method overloading simply involves having a method with the same name within the class. whereas in method overriding we can change method behaviour for a derived class. 7.) Can we override private virtual method ? No. 8.) Can we declare the override method static while the original method is non static ? No. 9.) Can we prevent my class from being inherited and becoming a base class from the other classes ? Yes. 10.) What is an interface class ? This is an abstract class with public abstract methods , all of which must be implemented in the inherited classes. 11.) Can we inherit multiple interfaces ? Yes. 13.) What is signature used for overloaded a method ? Use different data types Use different number of parameters Use different order of parameters 14.) What is the difference between an interface and abstract class ? In an interface, all methods must be abstract but in abstract class some methods can be concrete.In interface No accessibility modifiers are alloweded but in abstract class a accessibility modifier are alloweded. .
Monday, 24 August 2015
Saturday, 15 August 2015
Advanced C# Interview Questions And Answers Part 3
1.) Where is the output of TextWriterTraceListener redirected ? The output of TextWriteTraceListener Redirected to the console or a text file depending on the parameter passed to the constructor. 2.) Can you change the value of a variable while debugging a c# application ? Yes, if you are debugging via visual studio.NET. 3.) What is the service layer in 3 Tier .NET application ? Presentation Layer Business Access Layer(BAL) Data Access Layer (DAL) More Details... 4.) What is the role of the DataReader class in ADO.NET Connections ? The DataReader class returns a read-only dataset from the datasource when the command is executed. 5.) What is wild character in SQL SERVER ? The wild character is % in SQL . You can use this symbol with like keyword. More Details... 6.) What is the thumb rules of transactions ? There are four main property of transactions which is knows as ACID Property. Atomic :- It is an unit of work and does not dependent on previous and following transactions.It must be atomic. Consistency :- Data should be in consistence form. Means data is either committed or roll back ,not "in-between" case where something has been updated and something has not. Isolation :- It means, no transaction sees the intermediate results of current transaction. Durability :-It means,the values persist if the data had been committed even if the system crashes right after. 7.) What type of connection is supported by Microsoft SQL Server ? Window Authentication SQL Server Authentication 8.) What authentication is trusted and which is untrusted ? Windows Authentication is trusted because the username and password are checked with the Active Directory. The SQL server Authentication is untrusted because SQL Server is the only verified participating in transactions. 9.) What does dispose method do with the connection object ? It helps to delete it from the memory. 10.) What is a pre-requiste for connection polling ? In connection polling ,multiple process must agree that they will share the same connection where every parameter is the same. 11.) What is delegate ? A delegate encapsulates a references to a method. More Details... 12.) What is trigger ? A trigger is an event that is automatic executed when condition is satisfied.
Monday, 3 August 2015
Advanced C# Interview Questions And Answers Part 2
1.) What Namespaces are used to create a localized application ?
System.Globalization
System.Resources
// - --> Signal Line
/* */ - --> MultiLine
/// ---> XML Documentation Comments
3.) is XML is case sensitive ?
Yes.
Ex. Here XML documentation code?
Saturday, 1 August 2015
Advanced C# Interview Questions And Answers Part 1
1.) What is .NET Assembly ? A assembly is the smallest units of versioning and deployment in the .NET Application. In other way :- A single deployment unit is known as an assembly file. We generally use following assembly file in .NET Application. Web services Windows Services Service components Remoting Application WCF Services 2.) What are the types of Assembly files in .NET ? Private assembly Shared assembly 3.) What is a Strong Name in .NET ? A Strong Name contains the name of the assembly ,Version number,culture and a public key tokens. 4.) What is difference between private and shared assembly ? Private assembly:- Private assembly is used inside an application only. We can't access it fromout side the application. It is not identified by a strong Name. Public or shared assembly:- Shared assembly can be used in multiple applications. It can be used inside or outside the applications. It contains a strong name. 5.) Where is shared assembly file stored ? Global assembly cache 6.) How to create a strong name for a .NET Application ? To create a strong Name ,We use a strong Name tool (sn.exe). 7.) Can we place two files with same file name in GAC Folder ? Yes. 8.) How does GAC differentiate two files with same name ? GAC does differentiate two files with same name by version number. Ex. If first file has version number = 1.0.0.0 then second file has version number = 1.1.0.0 9.) What is delay signing ? It allows you to place shared assembly in the GAC folder by signing the assembly with public key or private key. 10.) What is design patterns ? A design patterns are the most important parts of any project life cycle. A good design patterns is more responsible to success of any projects. A good design patterns have the potential to permanent change the software engineering field. 11.) What are the types of design patterns ? Creational patterns Behavioral patterns Structure patterns 12.) What is .NET framework ? The .NET Frameworks is a part of Microsoft.NET . The .NET Frameworks consists of two parts: .NET Common Language Runtime .NET Class Library These two components are packaged together into the .NET Frameworks SDK .You can download it free from microsoft site.