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.
Thursday, 30 July 2015
General .NET Questions And Answers
11.) What is Garbage Collector in .NET? Garbage collector is used in .NET for two Purpose:- Managed the Resource allocation Released the memory from unused resources. System.GC.Collect() method is used in Garbage Collector in NET. 12.) What are the Security Features in .NET Application ? Role-based Security:-It allows the user to control the Access the Application Resources and Operations. Code Access Security:- It allows the user to access the Resources and perform privileged operations. 13.) What are the Components of the.NET Frameworks ? There are some components of the .NET Frameworks. Common Language Runtime (CLR) Common Type System(CTS) Meta Data and Assemblies .NET Framework class Library ASP.NET ADO.NET Windows Workflow Foundation(WWF) Windows Communication Foundation(WCF) Windows Presentation Foundation(WPF) LINQ 14.) What are the procedure for compile the C# code ? C# Code ----csc compiler----->MSIL + Meta Data --------jit compiler------>Native code More Details... 15.) What is CSC ? CSC is a Runtime Compiler that is used to compile the C# code. 16.) What is MSIL ?/ MSIL is a Microsoft Intermediate Language. CSC compiler convert the C# code to a different language that is Known as MSIL It is also known as assembly code and meta data.. 17.) How can say, .NET is platform Independent ? MSIL code is CPU Independent . MSIL Code must be converted into CPU specific code(Machine language code) either by JIT compiler or Ngen.exe Tool,so that you can say .NET is platform Independent like java. 18.) What is JIT ? JIT is a Just -in-Time compiler ,that is used to convert the MSIL code to the Native code(CPU understanding code). 19.) What is Meta Data in .NET ? Meta Data is known as Data about Data.You can easily find Meta Data of an Assembly File(.exe code) through the concept of Reflection. More Details... 20.) What is an assembly? A Single deployable unit of program is called as assembly(After compilation of the code,we get ,is called assembly file). 21.) What are different Types of assemblies? Private assemblies Public/Shared assemblies Private assemblies:-A Private assemblies is used for a particular application.Private assembly has no version Constraints. Public/Shared assemblies:- A public assembly is stored in GAC (Global assembly cache).It has version Constraint.It also stores the Shared assemblies file. 22.) What are the advantage of an assembly? Managed code Encapsulation Better performance 23.) What is Global assembly cache in .NET? A Global assembly cache (GAC) is the central place for registration assemblies in .NET. There are some ways to deploy an assembly in the Global assembly cache . GAC Tool (Gacutil.exe) An installer that is designed to work with GAC. Drag and Drop assembly into the cache from the Windows Explorer 24.) What is side by side Execution in .NET? The process of execution of multiple versions of an assembly or application is known as side by side Execution in .NET. 25.) When did release .NET Framework? .NET Framework 1.0 ---> 13 February 2002---> Visual studio 2002 IDE .NET Framework 1.1 ---> 25 April 2003 ---> Visual studio 200 IDE &Windows Server 2003 .NET Framework 2.0 -> 7 November 2005->Visual studio 2005 &Windows Server 2003 R2 .NET Framework 3.0 -> 6 November 2006---> Express Blend &Windows Server 2008 .NET Framework 3.5 --->19 November 2008---> Windows Server 2008 R2 .NET Framework 4.0 ---> 12 April 2010---> Visual studio 2010 IDE .NET Framework 4.5 ---> 15 August 2012---> Windows Server 2012 26.) What are the benefits of the .NET Framework? There are some benefits of the .NET Framework. Cross -platform support Language Interoperability Consistent Programming Model Automatic Management of Resources Very easy in Development
General .NET Questions And Answers Part 1
1.) What is .NET ? .NET is a platform which is used to develop the different types of Applications..NET Consist on:- .NET Framework Visual Studio .NET IDE 2.) What is .NET Framework? .NET Framework is a Kind of Environment(set of Components) which allow us to develop the different kinds of applications. Windows -based Applications Web based Applications Console Applications Building Windows Device Driver 3.) What is CLR? The Common Language Run time,Popularly Known as CLR. It is the heart and soul of the.net Framework .CLR is run time environment in which programs written in C# and other .net language are executed. It manage the .net application while running.It also supports cross-language interoperability. More Details.... 4.) What is BCL? BCL is known as Base Class Library.It is a collection of predefined classes and Namespaces. More Details.... 5.) What is CTS? CTS is known as Common Type System.It provides the common Datatype for all Language. More Details... 6.) What is CLS? CLS is a set of rules which must be followed by all the language compiler that we want to use on .NET platform. The CLS is a subset of CTS and therefore the language supporting the CLS can use each other. 7.) What is Managed Code? Managed code is the code that directly executed by the CLR. A Managed code is execute by the CLR as Following ways:- Select the Language compiler Compile the code to MSIL(CSC Compiler). Compile the MSIL code to Native code(JIT Compiler) Execute the code 8.) Which Utilities is used in .net to compile the Managed code Assembly to the processor specific native code? Native Image Generator(Ngen.exe). 9.) Which types of classes is used in .NET Framework? .NET Class Libraries. 10.) Which Namespace is used in .net class Libraries? System.object
Friday, 24 July 2015
ASP.NET INTERVIEW QUETION
2.) What is .NET Framework? .NET Framework is a Kind of Environment(set of Components) which allow us to develop the different kinds of applications. Windows -based Applications Web based Applications Console Applications Building Windows Device Driver
3.) What is CLR? The Common Language Run time,Popularly Known as CLR. It is the heart and soul of the.net Framework .CLR is run time environment in which programs written in C# and other .net language are executed. It manage the .net application while running.It also supports cross-language interoperability. More Details....
4.) What is BCL? BCL is known as Base Class Library.It is a collection of predefined classes and Namespaces. More Details....
5.) What is CTS? CTS is known as Common Type System.It provides the common Datatype for all Language. More Details...
6.) What is CLS? CLS is a set of rules which must be followed by all the language compiler that we want to use on .NET platform. The CLS is a subset of CTS and therefore the language supporting the CLS can use each other.
7.) What is Managed Code Managed code is the code that directly executed by the CLR. A Managed code is execute by the CLR as Following ways:- Select the Language compiler Compile the code to MSIL(CSC Compiler). Compile the MSIL code to Native code(JIT Compiler) Execute the code
8.) Which Utilities is used in .net to compile the Managed code Assembly to the processor specific native code? Native Image Generator(Ngen.exe).
9.) Which types of classes is used in .NET Framework? .NET Class Libraries.
10.) Which Namespace is used in .net class Libraries? System.object
11.) What is Garbage Collector in .NET? Garbage collector is used in .NET for two Purpose:- Managed the Resource allocation Released the memory from unused resources. System.GC.Collect() method is used in Garbage Collector in NET.
12.) What are the Security Features in .NET Application ? Role-based Security:-It allows the user to control the Access the Application Resources and Operations. Code Access Security:- It allows the user to access the Resources and perform privileged operations.
13.) What are the Components of the.NET Frameworks ? There are some components of the .NET Frameworks. Common Language Runtime (CLR) Common Type System(CTS) Meta Data and Assemblies .NET Framework class Library ASP.NET ADO.NET Windows Workflow Foundation(WWF) Windows Communication Foundation(WCF) Windows Presentation Foundation(WPF) LINQ
14.) What are the procedure for compile the C# code ? C# Code ----csc compiler----->MSIL + Meta Data --------jit compiler------>Native code More Details...
15.) What is CSC ? CSC is a Runtime Compiler that is used to compile the C# code.
16.) What is MSIL ? MSIL is a Microsoft Intermediate Language. CSC compiler convert the C# code to a different language that is Known as MSIL It is also known as assembly code and meta data..
17.) How can say, .NET is platform Independent ? MSIL code is CPU Independent . MSIL Code must be converted into CPU specific code(Machine language code) either by JIT compiler or Ngen.exe Tool,so that you can say .NET is platform Independent like java.
18.) What is JIT ? JIT is a Just -in-Time compiler ,that is used to convert the MSIL code to the Native code(CPU understanding code).
19.) What is Meta Data in .NET ? Meta Data is known as Data about Data.You can easily find Meta Data of an Assembly File(.exe code) through the concept of Reflection. More Details...
20.) What is an assembly? A Single deployable unit of program is called as assembly(After compilation of the code,we get ,is called assembly file).
21.) What are different Types of assemblies? Private assemblies Public/Shared assemblies Private assemblies:-A Private assemblies is used for a particular application.Private assembly has no version Constraints. Public/Shared assemblies:- A public assembly is stored in GAC (Global assembly cache).It has version Constraint.It also stores the Shared assemblies file.
22.) What are the advantage of an assembly? Managed code Encapsulation Better performance
23.) What is Global assembly cache in .NET? A Global assembly cache (GAC) is the central place for registration assemblies in .NET. There are some ways to deploy an assembly in the Global assembly cache . GAC Tool (Gacutil.exe) An installer that is designed to work with GAC. Drag and Drop assembly into the cache from the Windows Explorer
24.) What is side by side Execution in .NET? The process of execution of multiple versions of an assembly or application is known as side by side Execution in .NET.
25.) When did release .NET Framework? .NET Framework 1.0 ---> 13 February 2002---> Visual studio 2002 IDE .NET Framework 1.1 ---> 25 April 2003 ---> Visual studio 200 IDE &Windows Server 2003 .NET Framework 2.0 -> 7 November 2005->Visual studio 2005 &Windows Server 2003 R2 .NET Framework 3.0 -> 6 November 2006---> Express Blend &Windows Server 2008 .NET Framework 3.5 --->19 November 2008---> Windows Server 2008 R2 .NET Framework 4.0 ---> 12 April 2010---> Visual studio 2010 IDE .NET Framework 4.5 ---> 15 August 2012---> Windows Server 2012
26.) What are the benefits of the .NET Framework? There are some benefits of the .NET Framework. Cross -platform support Language Interoperability Consistent Programming Model Automatic Management of Resources Very easy in Development