|
what is '1000 projects'?
'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects
.net projects,
asp projects,
c & ds projects,
c++ projects (all),
cold fusion projects,
delphi projects,
java projects,
perl projects,
php projects,
sql projects,
vc++ projects,
visual basic projects.
how it works?
well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.
more number of projects?
here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com
Category Articles
Real life examples of polymorphisms, encapsulation and inheritance?
Added on Sun, Jan 3, 2010
polymorphisms:- polymorphisms is nothing but ability to take more than one forms(One Interface,Multiple Methods or One Name,Many Forms). Encapsulation:- -is nothing but wrapping the data and functions into single entity. Inheritance:- The Process... Read More
Which class use to Read/Write data to memory
Added on Sun, Jan 3, 2010
Ans: MemoryStream It is a nonbuffered stream whose encapsulated data is directly accessible in memory(RAM not files on disk). Read More
What is the C# equivalent of System.Single
Added on Sun, Jan 3, 2010
Ans: Float 32 bit e.g. float i = 6.8F; // or 6.8f By default, a real numeric literal on the right-hand side of the assignment operator is treated as double. Therefore, to initialize a float variable use the suffix f or F. If you don't... Read More
Which method is implicitly called when an object is created
Added on Sun, Jan 3, 2010
When an object is created Constructor is get called first. A default constructor is created automatically if we do not create a constructor inside a class. Read More
Is it possible to Override Private Virtual methods
Added on Sun, Jan 3, 2010
No: First of all you cannot declare a method as 'private virtual'. Read More
1.What happens in memory when you Box and Unbox a value-type?
Added on Sat, Nov 28, 2009
Boxing converts a value-type to a reference-type, thus storing the object on the heap. Unboxing converts a reference-type to a value-type, thus storing the value on the stack.Difference between directcast and ctype. ... Read More
What is the difference between proc. sent BY VAL and BY SUB?
Added on Sat, Nov 28, 2009
BY VAL: changes will not be reflected back to the variable. By REF: changes will be reflected back to that variable.( same as & symbol in c, c++) Read More
Is there an equivalent of exit() for quitting a C-sharp .NET application?
Added on Sat, Nov 28, 2009
Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app. Read More
What does the term immutable mean??
Added on Sat, Nov 28, 2009
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory. Read More
Which modifiers hides an inherited method with same signature
Added on Sun, Jan 3, 2010
Ans: B) Virtual it hides an inherited method with same signature by using Override method in derived class. Read More
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
Added on Sat, Nov 28, 2009
The syntax for calling another constructor is as follows: class B { B(int i) { } } class C : B { C() : base(5) // call base constructor B(5) { } C(int i) : this() // call C() { } public static void... Read More
When do you absolutely have to declare a class as abstract??
Added on Sat, Nov 28, 2009
1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden. 2. When at least one of the methods in the class is abstract. Read More
Why multiple Inheritance is not possible in C#?
Added on Sun, Jan 3, 2010
Multiple Inheritance is possible in C++, but its not possible in Java, and C#. what we are read above those are all we know, but as per my knowledge, in C++ to resolve multiple inheritance we are using "this pointer". But in C# there is no pointer... Read More
For performing repeated modification on string which class is preferred
Added on Sun, Jan 3, 2010
Answer B is correct. StringBuilder class is preferred for performing repeated operations on string since its value is mutable. String class represents a text value which is immutable. All operations on string class which appear to be modifying its... Read More
Which control cannot be placed in MDI?
Added on Sat, Nov 28, 2009
The controls that do not have events. Read More
What is indexer? where it is used plz explain
Added on Sun, Jan 3, 2010
Indexer is a special syntax for overloading [] operator for a class. After defining an indexer, array syntaxes can be used for the class objects. Read More
XML documents for a C# program can be generated using
Added on Sun, Jan 3, 2010
(B) /doc will generate xml documents Read More
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
Added on Thu, Nov 26, 2009
Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it. Read More
How do you make CLR enforce overflow checking
Added on Sun, Jan 3, 2010
Ans: A, Using Checked keyword we can enforce arithmetic overflow check within the specified code block. This option is used when we set the Arithmetic Overflow Check to false for the entire application. Incontrast if for the whole application u... Read More
How do you refer parent classes in C#
Added on Sun, Jan 3, 2010
This keyword is used for reffering current object and Base keyword is used for referring parrent class. so ans. is C Read More
Write one code example for compile time binding and one for run time binding?what is early/late binding?
Added on Sat, Nov 28, 2009
An object is early bound when it is assigned to a variable declared to be of a specific object type . Early bound objects allow the compiler to allocate memory and perform other optimizations before an application executes. ‘... Read More
The following namespace is used for globalization:
Added on Sun, Jan 3, 2010
The answer is A. The System.Globalization namespace contains classes that define culture-related information, including the language, the country/region, the calendars in use, the format patterns for dates, currency, and numbers, and the sort order... Read More
Where we can use DLL made in C#.Net
Added on Sun, Jan 3, 2010
Supporting .Net, bcoz DLL made in C#.Net semicompiled version. Its not a com object. It is used only in .Net Framework.As it is to be compiled at runtime to byte code. Read More
Is XML case-sensitive?
Added on Thu, Nov 26, 2009
Yes, so <Student> and <student> are different elements. Read More
What’s the difference between the Debug class and Trace class? Documentation looks the same.
Added on Thu, Nov 26, 2009
Use Debug class for debug builds, use Trace class for both debug and release builds. Read More
Which one is trusted and which one is untrusted?
Added on Thu, Nov 26, 2009
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction. Read More
ctype(123.34,integer) - should it throw an error? Why or why not?
Added on Sat, Nov 28, 2009
Answer1 It would work fine. As the runtime type of 123.34 would be double, and Double can be converted to Integer. Answer2 the ctype(123.34,integer) will work fine no errors Read More
1.How do you mark a method obsolete??
Added on Sat, Nov 28, 2009
[Obsolete] public int Foo() {…} or [Obsolete(”This is a message describing why this method is obsolete”)] public int Foo() {…} Read More
What does the volatile modifier do
Added on Sun, Jan 3, 2010
Ans: A, D The system always reads the current value of a volatile object at the point it is requested, even if the previous instruction asked for a value from the same object. Also, the value of the object is written immediately on assignment. ... Read More
What is mean "Death of Diamod"?
Added on Sun, Jan 3, 2010
It is the diamond of death problem. Multiple Inheritance means the ability to inherit from more than a single direct base class. For example: class Derived : public Base1, private Base2 { //... }; Allowing MI introduces the possibility that a class... Read More
How to fill datalist usinf XML file and how to bind it,code behind language is c#
Added on Sun, Jan 3, 2010
Hello i have written this code my project it working fine // Create dataset DataSet ds=new DataSet() //readXml file ds.readXml(Server.MapPath("*.xml")) //Create datalist object let's protected System.Web.UI.WebControls... Read More
How to implement multiple inheritence in C#
Added on Sun, Jan 3, 2010
Multiple inheritence in C# is achived by using Interfaces. Read More
What is the use of fixed statementS
Added on Sun, Jan 3, 2010
The fixed statement sets a pointer to a managed variable and "pins" that variable during the execution of statement. Without fixed, pointers to managed variables would be of little use since garbage collection could relocate the variables... Read More
What’s an abstract class?
Added on Thu, Nov 26, 2009
A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any... Read More
Can you change the value of a variable while debugging a C-sharp application???
Added on Thu, Nov 26, 2009
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window. Read More
If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors
Added on Thu, Nov 26, 2009
Q: If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor? A: Yes, just... Read More
Should validation (did the user enter a real date) occur server-side or client-side? Why?
Added on Fri, Nov 27, 2009
client side . there is no need to go to validate user input. If it relates to data base validation we need to validate at server side. Read More
Does C-sharp support <hash>define for defining global constants?
Added on Sat, Nov 28, 2009
No. If you want to get something that works like the following C code: #define A 1 use the following C# code: class MyConstants { public const int A = 1; } Then you use MyConstants.A where you would otherwise use the... Read More
How we can use inheritance and polymorphisms in c# programming?
Added on Sun, Jan 3, 2010
Inheritance in C# is similar to cpp, if you are familiar to cpp, the only difference is you dont inherit a class in public or protected mode, the way to inherit a class is Class Base { protected int length, breadth; public Base(int a, int b) { this... Read More
How do you inherit from a class in C-sharp??
Added on Thu, Nov 26, 2009
Place a colon and then the name of the base class. Notice that it’s double colon in C++. Read More
What’s the difference between the Debug class and Trace class?
Added on Fri, Nov 27, 2009
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. Read More
What happens in memory when you Box and Unbox a value-type?
Added on Fri, Nov 27, 2009
Boxing converts a value-type to a reference-type, thus storing the object on the heap. Unboxing converts a reference-type to a value-type, thus storing the value on the stack. Read More
What’s C sharp ?
Added on Sat, Nov 28, 2009
C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection. Read More
Is there a way to force garbage collection?
Added on Sat, Nov 28, 2009
Yes. Set all references to null and then call System.GC.Collect(). If you need to have some objects destructed, and System.GC.Collect() doesn’t seem to be doing it for you, you can force finalizers to be run by setting all the... Read More
Why would you use untrusted verification?
Added on Sat, Nov 28, 2009
Web Services might use it, as well as non-Windows applications. Read More
Explain manifest & metadata.
Added on Sat, Nov 28, 2009
Answer1 Manifest is metadata about assemblies. Metadata is machine-readable information about a resource, or “”data about data.” In .NET, metadata includes type definitions, version information, external assembly references,... Read More
Difference between imperative and interrogative code.
Added on Sat, Nov 28, 2009
There are imperative and interrogative functions. Imperative functions are the one which return a value while the interrogative functions do not return a value. Read More
Can you inherit from multiple base classes in C-sharp?
Added on Sat, Nov 28, 2009
No. C# does not support multiple inheritance, so you cannot inherit from more than one base class. You can however, implement multiple interfaces. Read More
What is partial class. & what is advantage.
Added on Sun, Jan 3, 2010
Partial Class is spilt UI Logic and Business logic in separate files. Multiples developers can work on the same class file. At the compilation time it will treat as single file by it class name. Read More
Can we use pointers in C#?
Added on Sun, Jan 3, 2010
well, actually, we can use pointers in C#..only tht we should mark the code as unsafe and before compiling we should use the tag unsafe. Read More
Which of the following statement is invalid with regards to constructor
Added on Sun, Jan 3, 2010
) Constructors should have the same name as class name B) Constructors have to be public so that class can be instantiated C) Constructors can not be overloaded All is currect........ Read More
What’s the implicit name of the parameter that gets passed into the class’ set method?
Added on Thu, Nov 26, 2009
Value, and its datatype depends on whatever variable we’re changing. Read More
Are private class-level variables inherited?
Added on Thu, Nov 26, 2009
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. Read More
Describe the accessibility modifier protected internal.
Added on Thu, Nov 26, 2009
It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in) Read More
How’s method overriding different from overloading?
Added on Thu, Nov 26, 2009
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class. Read More
Can you declare the override method static while the original method is non-static?
Added on Thu, Nov 26, 2009
No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override. Read More
Can you override private virtual methods?
Added on Thu, Nov 26, 2009
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. Read More
Can you prevent your class from being inherited and becoming a base class for some other classes?
Added on Thu, Nov 26, 2009
Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept... Read More
When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)?
Added on Thu, Nov 26, 2009
When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden. Read More
What’s an interface class?
Added on Thu, Nov 26, 2009
It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes. Read More
Why can’t you specify the accessibility modifier for methods inside the interface?
Added on Thu, Nov 26, 2009
They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default. Read More
And if they have conflicting method names?
Added on Thu, Nov 26, 2009
It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different... Read More
What’s the difference between an interface and abstract class?
Added on Thu, Nov 26, 2009
In the interface all methods must be abstract; in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes. Read More
How can you overload a method?
Added on Thu, Nov 26, 2009
Different parameter data types, different number of parameters, different order of parameters. Read More
What’s the difference between System.String and System.StringBuilder classes?
Added on Thu, Nov 26, 2009
System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. Read More
What’s the advantage of using System.Text.StringBuilder over System.String?
Added on Thu, Nov 26, 2009
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created. Read More
What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
Added on Thu, Nov 26, 2009
The first one performs a deep copy of the array, the second one is shallow. Read More
How can you sort the elements of the array in descending order?
Added on Thu, Nov 26, 2009
By calling Sort() and then Reverse() methods. Read More
What’s the C-sharp equivalent of CPP catch (…), which was a catch-all statement for any possible exception?
Added on Thu, Nov 26, 2009
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}. Read More
Can multiple catch blocks be executed?
Added on Thu, Nov 26, 2009
No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block. Read More
Why is it a bad idea to throw your own exceptions?
Added on Thu, Nov 26, 2009
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some... Read More
What’s a delegate?
Added on Thu, Nov 26, 2009
A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers. Read More
What’s a multicast delegate?
Added on Thu, Nov 26, 2009
It’s a delegate that points to and eventually fires off several methods. Read More
How’s the DLL Hell problem solved in .NET?
Added on Thu, Nov 26, 2009
Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly. Read More
What are the ways to deploy an assembly?
Added on Thu, Nov 26, 2009
An MSI installer, a CAB archive, and XCOPY command. Read More
What’s a satellite assembly?
Added on Thu, Nov 26, 2009
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called... Read More
What’s the difference between // comments, /* */ comments and /// comments?
Added on Thu, Nov 26, 2009
Single-line, multi-line and XML documentation comments. Read More
What’s the difference between <c> and <code> XML documentation tag?
Added on Thu, Nov 26, 2009
Single line code example and multiple-line code example. Read More
What debugging tools come with the .NET SDK?
Added on Thu, Nov 26, 2009
CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch. Read More
What does the This window show in the debugger?
Added on Thu, Nov 26, 2009
It points to the object that’s pointed to by this reference. Object’s instance data is shown. Read More
What does assert() do?
Added on Thu, Nov 26, 2009
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true. Read More
Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
Added on Thu, Nov 26, 2009
The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine... Read More
Where is the output of TextWriterTraceListener redirected?
Added on Thu, Nov 26, 2009
To the Console or a text file depending on the parameter passed to the constructor. Read More
How do you debug an ASP.NET Web application?
Added on Thu, Nov 26, 2009
Attach the aspnet_wp.exe process to the DbgClr debugger. Read More
What are three test cases you should go through in unit testing?
Added on Thu, Nov 26, 2009
Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly) Read More
Explain the three services model (three-tier application).
Added on Thu, Nov 26, 2009
Presentation (UI), business (logic and underlying code) and data (from storage or other sources). Read More
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
Added on Thu, Nov 26, 2009
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it... Read More
What’s the role of the DataReader class in ADO.NET connections?
Added on Thu, Nov 26, 2009
It returns a read-only dataset from the data source when the command is executed. Read More
Explain ACID rule of thumb for transactions.
Added on Thu, Nov 26, 2009
Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been... Read More
What connections does Microsoft SQL Server support?
Added on Thu, Nov 26, 2009
Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). Read More
Why would you use untrusted verificaion?
Added on Thu, Nov 26, 2009
Web Services might use it, as well as non-Windows applications Read More
What is a pre-requisite for connection pooling?
Added on Thu, Nov 26, 2009
Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. Read More
Who is a protected class-level variable available to?
Added on Thu, Nov 26, 2009
It is available to any sub-class (a class inheriting this class). Read More
Are private class-level variables inherited??
Added on Thu, Nov 26, 2009
Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited. Read More
Describe the accessibility modifier “protected internal”.
Added on Thu, Nov 26, 2009
It is available to classes that are within the same assembly and derived from the specified base class. Read More
What does the term immutable mean?
Added on Thu, Nov 26, 2009
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory. Read More
What’s the difference between System.String and System.Text.StringBuilder classes?
Added on Thu, Nov 26, 2009
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. Read More
What’s the advantage of using System.Text.StringBuilder over System.String??
Added on Thu, Nov 26, 2009
StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created. Read More
What’s the difference between the System.Array.CopyTo() and System.Array.Clone()??
Added on Thu, Nov 26, 2009
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A... Read More
How can you sort the elements of the array in descending order??
Added on Thu, Nov 26, 2009
By calling Sort() and then Reverse() methods. Read More
1.What’s the C-sharp syntax to catch any possible exception?
Added on Thu, Nov 26, 2009
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}. Read More
Can multiple catch blocks be executed for a single try statement?
Added on Thu, Nov 26, 2009
No. Once the proper catch block processed, control is transferred to the finally block (if there are any). Read More
Explain the three services model commonly know as a three-tier application.
Added on Thu, Nov 26, 2009
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources). Read More
What is the syntax to inherit from a class in C-sharp???
Added on Thu, Nov 26, 2009
Place a colon and then the name of the base class. Example: class MyNewClass : MyBaseClass Read More
Can you prevent your class from being inherited by another class?
Added on Thu, Nov 26, 2009
Yes. The keyword “sealed” will prevent the class from being inherited. Read More
When do you absolutely have to declare a class as abstract?
Added on Thu, Nov 26, 2009
1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden. 2. When at least one of the methods in the class is abstract. Read More
What’s an abstract class??
Added on Thu, Nov 26, 2009
A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation. Read More
What is an interface class?
Added on Thu, Nov 26, 2009
Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes. Read More
Can you inherit multiple interfaces??
Added on Thu, Nov 26, 2009
Yes. .NET does support multiple interfaces. Read More
What happens if you inherit multiple interfaces and they have conflicting method names?
Added on Thu, Nov 26, 2009
It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different... Read More
What’s the difference between an interface and abstract class??
Added on Thu, Nov 26, 2009
In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may... Read More
What is the difference between a Struct and a Class?
Added on Thu, Nov 26, 2009
Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is that structs cannot inherit. Read More
What’s the implicit name of the parameter that gets passed into the set method/property of a class?
Added on Thu, Nov 26, 2009
Value. The data type of the value parameter is defined by whatever data type the property is declared as. Read More
How is method overriding different from method overloading?
Added on Thu, Nov 26, 2009
When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class. Read More
Can you declare an override method to be static if the original method is not static?
Added on Thu, Nov 26, 2009
No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to keyword override) Read More
What are the different ways a method can be overloaded?
Added on Thu, Nov 26, 2009
Different parameter data types, different number of parameters, different order of parameters. Read More
What’s a delegate??
Added on Thu, Nov 26, 2009
A delegate object encapsulates a reference to a method. Read More
What’s a multicast delegate??
Added on Thu, Nov 26, 2009
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called. Read More
Is XML case-sensitive??
Added on Thu, Nov 26, 2009
What’s the difference between // comments, /* */ comments and /// comments??
Added on Thu, Nov 26, 2009
Single-line comments, multi-line comments, and XML documentation comments. Read More
What debugging tools come with the .NET SDK??
Added on Thu, Nov 26, 2009
1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. 2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. Read More
What does assert() method do?
Added on Fri, Nov 27, 2009
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true. Read More
Why are there five tracing levels in System.Diagnostics.TraceSwitcher??
Added on Fri, Nov 27, 2009
The tracing dumps can be quite verbose. For applications that are constantly running you run the risk of overloading the machine and the hard drive. Five levels range from None to Verbose, allowing you to fine-tune the... Read More
Where is the output of TextWriterTraceListener redirected??
Added on Fri, Nov 27, 2009
To the Console or a text file depending on the parameter passed to the constructor. Read More
How do you debug an ASP.NET Web application??
Added on Fri, Nov 27, 2009
Attach the aspnet_wp.exe process to the DbgClr debugger. Read More
Can you change the value of a variable while debugging a C Sharp application?
Added on Fri, Nov 27, 2009
Yes. If you are debugging via Visual Studio.NET, just go to Immediate window. Read More
What is the role of the DataReader class in ADO.NET connections?
Added on Fri, Nov 27, 2009
It returns a read-only, forward-only rowset from the data source. A DataReader provides fast access when a forward-only sequential read is needed. Read More
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET??
Added on Fri, Nov 27, 2009
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix. OLE-DB.NET is... Read More
What is the wildcard character in SQL?
Added on Fri, Nov 27, 2009
Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’. Read More
Explain ACID rule of thumb for transactions?
Added on Fri, Nov 27, 2009
A transaction must be: 1. Atomic - it is one unit of work and does not dependent on previous and following transactions. 2. Consistent - data is either... Read More
Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?
Added on Fri, Nov 27, 2009
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction. Read More
What does the Dispose method do with the connection object?
Added on Fri, Nov 27, 2009
Deletes it from the memory. To Do: answer better. The current answer is not entirely correct. Read More
How is the DLL Hell problem solved in .NET?
Added on Fri, Nov 27, 2009
Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly. Read More
What is a pre-requisite for connection pooling??
Added on Fri, Nov 27, 2009
Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. The connection string must be identical. Read More
What is a satellite assembly?
Added on Fri, Nov 27, 2009
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite... Read More
What are the ways to deploy an assembly??
Added on Fri, Nov 27, 2009
An MSI installer, a CAB archive, and XCOPY command. Read More
When should you call the garbage collector in .NET?
Added on Fri, Nov 27, 2009
As a good rule, you should not call the garbage collector. However, you could call the garbage collector when you are done using a large object (or set of objects) to force the garbage collector to dispose of those very large... Read More
Explain the differences between Server-side and Client-side code?
Added on Fri, Nov 27, 2009
Server side code will execute at server end all the business logic will execute at server end where as client side code will execute at client side at browser end. Read More
What does the "EnableViewState" property do? Why would I want it on or off?
Added on Fri, Nov 27, 2009
IT keeps the data of the control during post backs. if we turn off the values should not populate during server round trip. Read More
What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Added on Fri, Nov 27, 2009
Server.Trnasfer will prevent round trip. it will redirect pages which or in the same directory. NO way to pass the query strings . Thru http context we can able to get the previous page control values. ... Read More
Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component
Added on Fri, Nov 27, 2009
Web services are best suite for Hetrogenious environment. Remoting is best suite for Homogenious environment. The systems that under CLR. Read More
Can you explain the difference between an ADO.NET Dataset and anADO Recordset?
Added on Fri, Nov 27, 2009
DIsconnected architechure . Maintainace relation schemas. MUtilple table grouping. Connected one . Read More
Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
Added on Fri, Nov 27, 2009
APplication_start need for global variable which are available over the application. Sesssion_Start : login dependent ( user dependent) Read More
If I’m developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is
Added on Fri, Nov 27, 2009
Q: If I’m developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the... Read More
How does VB.NET/C-sharp achieve polymorphism?
Added on Fri, Nov 27, 2009
Function overloading. Operator overloading. Read More
Can you explain what inheritance is and an example of when you might use it?
Added on Fri, Nov 27, 2009
Heridity. Use the existing functionality along with its own properities. Read More
How would you implement inheritance using VB.NET/C Sharp?
Added on Sat, Nov 28, 2009
Derived Class : Basecalss VB.NEt : Derived Class Inherits Baseclass Read More
Whats an assembly
Added on Sat, Nov 28, 2009
A Basic unit of executable code > Which contains : Manifest - Meta data versioning , Calture , IL, Reference Read More
Explain what a diffgram is, and a good use for one
Added on Sat, Nov 28, 2009
is an xml grammer. it talk about state of node in xml file. Read More
What are the disadvantages of viewstate/what are the benefits
Added on Sat, Nov 28, 2009
IT can be hacked . page is size is heavy. Read More
How would you get ASP.NET running in Apache web servers - why would you even do this?
Added on Sat, Nov 28, 2009
Install Mod_AspDotNet Add at the end of C:Program FilesApache GroupApache2confhttpd.conf the following lines Read More
Whats MSIL, and why should my developers need an appreciation of it if at all?
Added on Sat, Nov 28, 2009
Microsoft Intermeidate lanaguage. which is the out put for all the .net supported languages after comiplation will produce. Appreciation for cross language support. Read More
How do you create a permanent cookie?
Added on Sat, Nov 28, 2009
Cooke = ne cookee(). cooke.adddate. Read More
How many types of JIT compilers are available?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] There are Two types of JIT compilers. Read More
What are the different types of assemblies – name them?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] Private Public/Shared Satellite assembly Read More
What is GAC? What are the steps to be taken to pick up the latest version from GAC?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] This Global Assembly Cache(GAC) stores .NET assemblies to be shared by several applications on that computer. Read More
How do we use different versions of private assemblies in same application without re-build?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] In Asseblyinfo file need specify assembly version. assembly: AssemblyVersion Read More
Different methods of using a legacy COM component in .NET framework?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] 1. TLBIMP to create an Assembly from a COM component 2. Reference a COM component directly from .NET Editor Read More
How do you implement SSL?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] 1. create certificate request [ =>Right click on the website (VD) =>Click Directory Security Tab and click Server Certificate => Type name of certificate , Organization name , server name ... Read More
Is it possible to debug java-script in .NET IDE? If yes, how?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] Yes. Write debugger statement to stop the cursor for debugging . Read More
How do you create a webservice proxy without .NET IDE and how do you test it?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] wsdl utility we can test by consuming our service either windows / web application Read More
How to debug an assembly which is on Server?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] [assembly: AssemblyDescription("Debug")] Read More
How many ways can we maintain the state of a page?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] 1.Client Side [ Query string, hidden variables, view state,cookies] 2.Server side [application , session, database] Read More
How do we Generate and compile source code dynamically?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] .Net provides powerful access to the IL code generation process through the System.CodeDom.Compiler and Microsoft.CSharp and Microsoft.VisualBasic namespaces. In these namespaces we can find the tools that... Read More
How to make a webservice call asynchronous?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] //Create a new instance of the Web Service Class localhost.Service1 service = new MyWebServiceApp.localhost.Service1(); //Make the asynchronous Web Service call and call WriteHello service... Read More
How to invoke a webservice using javascript?
Added on Sat, Nov 28, 2009
[Rama Naresh Talluri] <script language =”javascript”> Function init() { Service.useservice(“/services/test.asmx?WSDL”, “MyTest”); Var iCallID; iCallID = service.MyTest.callService(“add”,1,2); ... Read More
What is the use of multicast delegate?
Added on Sat, Nov 28, 2009
A multicast delegate can call more than one method. Read More
What is the purpose of a private constructor?
Added on Sat, Nov 28, 2009
Prevent the creation of instance for a class Read More
Differentiate Dispose and Finalize.
Added on Sat, Nov 28, 2009
Finalize is called by the Garbage Collector, and the state of manage objects cannot be guaranteed, so we can not reference them. Also, we cannot determine when the GC will run, and which objects it will Finalize. Dispose is called... Read More
What is the purpose of Singleton pattern?
Added on Sat, Nov 28, 2009
Singleton pattern is used to make sure that only one instance of a given class exists. Read More
Difference between structure and class.
Added on Sat, Nov 28, 2009
Structures are value types; classes are reference types. Structures use stack allocation; classes use heap allocation. All structure elements are Public by default; class variables and constants are Private by... Read More
Difference between DOM and SAX parser.
Added on Sat, Nov 28, 2009
DOM Approach is useful for small documents in which the program needs to process a large portion of the document. SAX approach is useful for large documents in which the program only needs to process a small portion of the document... Read More
Under what circumstances do you use DOM parser and SAX parser
Added on Sat, Nov 28, 2009
DOM Approach is useful for small documents in which the program needs to process a large portion of the document. SAX approach is useful for large documents in which the program only needs to process a small portion of the document... Read More
What is a well-formed XML and is the purpose of Diffgram?
Added on Sat, Nov 28, 2009
A textual object is a well-formed XML document if it satisfies all the following points 1. Taken as a whole, it matches the production labeled document. 2. It meets all the well-formedness constraints given in this specification. ... Read More
Differentiate between legacy ADO recordset and .NET dataset. What are typed datasets.
Added on Sat, Nov 28, 2009
Recordset provides data one row at a time. Connection is open . Dataset is a data structure which represents the complete table data at same time. Dataset is just a data store and manipulation is done through DataAdapters... Read More
Is it possible to have different access modifiers on the get/set methods of a property?
Added on Sat, Nov 28, 2009
No. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal set... Read More
If I return out of a try/finally in C-sharp, does the code in the finally-clause run?
Added on Sat, Nov 28, 2009
Yes. The code in the finally always runs. If you return out of the try block, or even if you do a goto out of the try, the finally block always runs: using System; class main { public static void Main() { try { Console... Read More
I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?
Added on Sat, Nov 28, 2009
You should declare the variable as an int, but when you pass it in you must specify it as ‘out’, like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { } Read More
How does one compare strings in C-sharp?
Added on Sat, Nov 28, 2009
In the past, you had to call .ToString() on the strings when using the == or != operators to compare the strings’ values. That will still work, but the C# compiler now automatically compares the values instead of the references... Read More
How do you specify a custom attribute for the entire assembly (rather than for a class)?
Added on Sat, Nov 28, 2009
Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows: using System; [assembly : MyAttributeClass] class X {} Note that in an IDE... Read More
How do you mark a method obsolete?
Added on Sat, Nov 28, 2009
[Obsolete] public int Foo() {...} or [Obsolete("This is a message describing why this method is obsolete")] public int Foo() {...} Note: The O in Obsolete is always capitalized. Read More
How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C-sharp?
Added on Sat, Nov 28, 2009
You want the lock statement, which is the same as Monitor Enter/Exit: lock(obj) { // code } translates to try { CriticalSection.Enter(obj); // code } finally { CriticalSection.Exit(obj); } Read More
How do you directly call a native function exported from a DLL?
Added on Sat, Nov 28, 2009
Here’s a quick example of the DllImport attribute in action: using System.Runtime.InteropServices; class C { [DllImport("user32.dll")] public static extern int MessageBoxA(int h, string m, string c, int type); public static int Main() {... Read More
How do I simulate optional parameters to COM calls?
Added on Sat, Nov 28, 2009
You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. Read More
What do you know about .NET assemblies?
Added on Sat, Nov 28, 2009
Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications. ... Read More
What’s the difference between private and shared assembly?
Added on Sat, Nov 28, 2009
Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name. Read More
What’s a strong name?
Added on Sat, Nov 28, 2009
A strong name includes the name of the assembly, version number, culture identity, and a public key token. Read More
How can you tell the application to look for assemblies at the locations other than its own install?
Added on Sat, Nov 28, 2009
Use the directive in the XML .config file for a given application. < probing privatePath=c:mylibs; bindebug /> should do the trick. Or you can add additional search paths in the Properties box of the deployed application. ... Read More
How can you debug failed assembly binds?
Added on Sat, Nov 28, 2009
Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched. Read More
How can you create a strong name for a .NET assembly?
Added on Sat, Nov 28, 2009
With the help of Strong Name tool (sn.exe). Read More
Where’s global assembly cache located on the system?
Added on Sat, Nov 28, 2009
Usually C:winntassembly or C:windowsassembly. Read More
Can you have two files with the same file name in GAC?
Added on Sat, Nov 28, 2009
Yes, remember that GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll... Read More
So let’s say I have an application that uses MyApp.dll assembly, version 1.0.0.0. There is a security bug in that assembly
Added on Sat, Nov 28, 2009
Q : So let’s say I have an application that uses MyApp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name MyApp.dll 1.1.0.0. How do I tell the... Read More
What is delay signing?
Added on Sat, Nov 28, 2009
Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and... Read More
Can you prevent your class from being inherited and becoming a base class for some other classes??
Added on Sat, Nov 28, 2009
Yes, that is what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It is the same concept as final class in... Read More
I was trying to use an "out int" parameter in one of my functions. How should I declare the variable that I am passing to it?
Added on Sat, Nov 28, 2009
You should declare the variable as an int, but when you pass it in you must specify it as ’out’, like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { } Read More
How do I make a DLL in C-sharp?
Added on Sat, Nov 28, 2009
You need to use the /target:library compiler option. Read More
How do I simulate optional parameters to COM calls??
Added on Sat, Nov 28, 2009
You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. Read More
What is the C-sharp equivalent of CPP catch (…), which was a catch-all statement for any possible exception? Does C-sharp support try-catch-finally blocks?
Added on Sat, Nov 28, 2009
Yes. Try-catch-finally blocks are supported by the C# compiler. Here’s an example of a try-catch-finally block: using System; public class TryTest { static void Main() { try { Console.WriteLine("In Try... Read More
Is there regular expression (regex) support available to C-sharpdevelopers?
Added on Sat, Nov 28, 2009
Yes. The .NET class libraries provide support for regular expressions. Look at the documentation for the System.Text.RegularExpressions namespace. Read More
Does C-sharp support properties of array types?
Added on Sat, Nov 28, 2009
Yes. Here’s a simple example: using System; class Class1 { private string[] MyField; public string[] MyProperty { get { return MyField; } set { MyField = value; } } } class MainClass { public static int Main... Read More
What connections does Microsoft SQL Server support??
Added on Sat, Nov 28, 2009
Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords) Read More
What is a satellite assembly??
Added on Sat, Nov 28, 2009
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite... Read More
How is method overriding different from overloading?
Added on Sat, Nov 28, 2009
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class. Read More
When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)??
Added on Sat, Nov 28, 2009
When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden. Read More
What is the implicit name of the parameter that gets passed into the class set method?
Added on Sat, Nov 28, 2009
Value, and its datatype depends on whatever variable we are changing. Read More
How do I register my code for use by classic COM clients?
Added on Sat, Nov 28, 2009
Use the regasm.exe utility to generate a type library (if needed) and the necessary entries in the Windows Registry to make a class available to classic COM clients. Once a class is registered in the Windows Registry with regasm.exe,... Read More
How do I do implement a trace and assert?
Added on Sat, Nov 28, 2009
Use a conditional attribute on the method, as shown below: class Debug { [conditional("TRACE")] public void Trace(string s) { Console.WriteLine(s); } } class MyClass { public static void Main() { ... Read More
How do I create a multi language, multi file assembly?
Added on Sat, Nov 28, 2009
Unfortunately, this is currently not supported in the IDE. To do this from the command line, you must compile your projects into netmodules (/target:module on the C# compiler), and then use the command line tool al.exe (alink) to link... Read More
What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development?
Added on Sat, Nov 28, 2009
Try using RegAsm.exe. The general syntax would be: RegAsm. A good description of RegAsm and its associated switches is located in the .NET SDK docs. Just search on "Assembly Registration Tool".Explain ACID rule of thumb for... Read More
How do I create a multilanguage, single-file assembly?
Added on Sat, Nov 28, 2009
This is currently not supported by Visual Studio .NET. Read More
Why cannot you specify the accessibility modifier for methods inside the interface?
Added on Sat, Nov 28, 2009
They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it is public by default. Read More
Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?
Added on Sat, Nov 28, 2009
There is no way to restrict to a namespace. Namespaces are never units of protection. But if you’re using assemblies, you can use the ’internal’ access modifier to restrict access to only within the assembly. ... Read More
Why do I get a "CS5001: does not have an entry point defined" error when compiling?
Added on Sat, Nov 28, 2009
The most common problem is that you used a lowercase ’m’ when defining the Main method. The correct way to implement the entry point is as follows: class test { static void Main(string[] args) {} } Read More
What optimizations does the C-sharp compiler perform when you use the /optimize<plus> compiler option?
Added on Sat, Nov 28, 2009
The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch w/... Read More
How can I create a process that is running a supplied native executable (e.g., cmd.exe)?
Added on Sat, Nov 28, 2009
The following code should run the executable and wait for it to exit before continuing: using System; using System.Diagnostics; public class ProcessTest { public static void Main(string[] args) { Process p = Process... Read More
What is the difference between the System.Array.CopyTo() and System.Array.Clone()?
Added on Sat, Nov 28, 2009
The first one performs a deep copy of the array, the second one is shallow. Read More
How do I declare inout arguments in C-sharp?
Added on Sat, Nov 28, 2009
The equivalent of inout in C# is ref. , as shown in the following example: public void MyMethod (ref String str1, out String str2) { ... } When calling the method, it would be called like this: String s1; String s2; s1 = ... Read More
Is there a way of specifying which block or loop to break out of when working with nested loops?
Added on Sat, Nov 28, 2009
The easiest way is to use goto: using System; class BreakExample { public static void Main(String[] args) { for(int i=0; i<3; i++) { Console.WriteLine("Pass {0}: ", i); for( int j=0 ; j<100 ; j++ ) { ... Read More
What is the difference between const and static read-only?
Added on Sat, Nov 28, 2009
The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case a bit, the containing class... Read More
What is the difference between System.String and System.StringBuilder classes?
Added on Sat, Nov 28, 2009
System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. Read More
Can you change the value of a variable while debugging a C-sharp application?
Added on Sat, Nov 28, 2009
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window. Read More
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
Added on Sat, Nov 28, 2009
With regard to versioning, interfaces are less flexible than classes. With a class, you can ship version 1 and then, in version 2, decide to add another method. As long as the method is not... Read More
Which one is trusted and which one is untrusted??
Added on Sat, Nov 28, 2009
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL... Read More
Does Console.WriteLine() stop printing when it reaches a NULL character within a string?
Added on Sat, Nov 28, 2009
Strings are not null terminated in the runtime, so embedded nulls are allowed. Console.WriteLine() and all similar methods continue until the end of the string. Read More
What is the advantage of using System.Text.StringBuilder over System.String?
Added on Sat, Nov 28, 2009
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it is being operated on, a new instance is created. ... Read More
Why do I get a security exception when I try to run my C-sharp app?
Added on Sat, Nov 28, 2009
Some security exceptions are thrown if you are working on a network share. There are some parts of the frameworks that will not run if being run off a share (roaming profile, mapped drives, etc.). To see if this is what’s... Read More
Is there any sample C-sharp code for simple threading?
Added on Sat, Nov 28, 2009
Some sample code follows: using System; using System.Threading; class ThreadTest { public void runme() { Console.WriteLine(... Read More
What is the difference between and XML documentation tag?
Added on Sat, Nov 28, 2009
Single line code example and multiple-line code example. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources). ... Read More
How do you inherit from a class in C-sharp?
Added on Sat, Nov 28, 2009
Place a colon and then the name of the base class. Notice that it is double colon in C++. Read More
How do I port "synchronized" functions from Visual J<plus><plus> to C-sharp?
Added on Sat, Nov 28, 2009
Original Visual J++ code: public synchronized void Run() { // function body } Ported C# code: class C { public void Run() { lock(this) { // function body } } public static void Main() {} } Read More
Can I define a type that is an alias of another type (like typedef in CPP)?
Added on Sat, Nov 28, 2009
Not exactly. You can create an alias within a single file with the "using" directive: using System; using Integer = System.Int32; // alias But you can’t create a true alias, one that extends beyond the file in which it is... Read More
Is it possible to have different access modifiers on the get/set methods of a property??
Added on Sat, Nov 28, 2009
No. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal... Read More
Is it possible to have a static indexer in C-sharp?
Added on Sat, Nov 28, 2009
No. Static indexers are not allowed in C#. Read More
Does C-sharp support templates?
Added on Sat, Nov 28, 2009
No. However, there are plans for C# to support a type of template known as a generic. These generic types have similar syntax but are instantiated at run time as opposed to compile time. You can read more about them here. Read More
Does C-sharp support parameterized properties?
Added on Sat, Nov 28, 2009
No. C# does, however, support the concept of an indexer from language spec. An indexer is a member that enables an object to be indexed in the same way as an array. Whereas properties enable field-like access, indexers enable array... Read More
Does C-sharp support C type macros?
Added on Sat, Nov 28, 2009
No. C# does not have macros. Keep in mind that what some of the predefined C macros (for example, __LINE__ and __FILE__) give you can also be found in .NET classes like System.Diagnostics (for example, StackTrace and StackFrame), but... Read More
Can you declare the override method static while the original method is non-static??
Added on Sat, Nov 28, 2009
No, you cannot, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override Read More
Can multiple catch blocks be executed??
Added on Sat, Nov 28, 2009
No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block. Read More
Can you override private virtual methods??
Added on Sat, Nov 28, 2009
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. Read More
Why does my Windows application pop up a console window every time I run it?
Added on Sat, Nov 28, 2009
Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you’re using the command line, compile with /target:winexe & not target:exe. Read More
What is the wildcard character in SQL??
Added on Sat, Nov 28, 2009
Let us say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve La%. Read More
What is the role of the DataReader class in ADO.NET connections??
Added on Sat, Nov 28, 2009
It returns a read-only dataset from the data source when the command is executed. Read More
What does the This window show in the debugger??
Added on Sat, Nov 28, 2009
It points to the object that is pointed to by this reference. Object’s instance data is shown. Read More
Describe the accessibility modifier protected internal?
Added on Sat, Nov 28, 2009
It is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in). Read More
What is a multicast delegate?
Added on Sat, Nov 28, 2009
It is a delegate that points to and eventually fires off several methods. Read More
What is an interface class??
Added on Sat, Nov 28, 2009
It is an abstract class with public abstract methods all of which must be implemented in the inherited classes. Read More
How does one compare strings in C-sharp??
Added on Sat, Nov 28, 2009
In the past, you had to call .ToString() on the strings when using the == or != operators to compare the strings’ values. That will still work, but the C# compiler now automatically compares the values instead of the references... Read More
What does assert() do??
Added on Sat, Nov 28, 2009
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true. Read More
How do I get deterministic finalization in C-sharp?
Added on Sat, Nov 28, 2009
In a garbage collected environment, it’s impossible to get true determinism. However, a design pattern that we recommend is implementing IDisposable on any class that contains a critical resource. Whenever this class is consumed... Read More
How can I get around scope problems in a try/catch?
Added on Sat, Nov 28, 2009
If you try to instantiate the class inside the try, it’ll be out of scope when you try to access it from the catch block. A way to get around this is to do the following: Connection conn = null; try { conn = new... Read More
Why do I get an error (CS1006) when trying to declare a method without specifying a return type?
Added on Sat, Nov 28, 2009
If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results... Read More
How do I convert a string to an int in C-sharp?
Added on Sat, Nov 28, 2009
Here’s an example: using System; class StringToInt { public static void Main() { String s = "105"; int x = Convert.ToInt32(s); Console.WriteLine(x); } } Read More
How do you directly call a native function exported from a DLL??
Added on Sat, Nov 28, 2009
Here’s a quick example of the DllImport attribute in action: using System.Runtime.InteropServices; class C { [DllImport("user32.dll")] public static extern int MessageBoxA(int h, string m, string c,... Read More
How do you specify a custom attribute for the entire assembly (rather than for a class)??
Added on Sat, Nov 28, 2009
Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows: using System; [assembly : MyAttributeClass] class X {} ... Read More
What is the difference between a struct and a class in C-sharp?
Added on Sat, Nov 28, 2009
From language spec: The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes in several important ways;... Read More
What is the difference between the Debug class and Trace class?
Added on Sat, Nov 28, 2009
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. Read More
How can you overload a method??
Added on Sat, Nov 28, 2009
Different parameter data types, different number of parameters, different order of parameters. Read More
How can I get the ASCII code for a character in C-sharp?
Added on Sat, Nov 28, 2009
Casting the char to an int will give you the ASCII value: char c = ’f’; System.Console.WriteLine((int)c); or for a character in a string: System.Console.WriteLine((int)s[3]); The base class libraries also offer ways to do... Read More
How do I create a Delegate/MulticastDelegate?
Added on Sat, Nov 28, 2009
C# requires only a single parameter for delegates: the method address. Unlike other languages, where the programmer must specify an object reference and the method to invoke, C# can infer both pieces of... Read More
How do destructors and garbage collection work in C-sharp?
Added on Sat, Nov 28, 2009
C# has finalizers (similar to destructors except that the runtime doesn’t guarantee they’ll be called), and they are specified as follows: class C { ~C() { // your code } public static void Main() {} ... Read More
My switch statement works differently! Why?
Added on Sat, Nov 28, 2009
C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x) { case 0: // do something case 1: // do something in common with 0 default: /... Read More
How can I access the registry from C-sharp code?
Added on Sat, Nov 28, 2009
By using the Registry and RegistryKey classes in Microsoft.Win32, you can easily access the registry. The following is a sample that reads a key and displays its value: using System;using Microsoft.Win32; class regTest { public... Read More
How do you mark a method obsolete??
Added on Sat, Nov 28, 2009
Assuming you’ve done a "using System;": [Obsolete] public int Foo() {...} or [Obsolete("This is a message describing why this method is obsolete")] public int Foo() {...}... Read More
Why does DllImport not work for me?
Added on Sat, Nov 28, 2009
All methods marked with the DllImport attribute must be marked as public static extern. Read More
What is a delegate?
Added on Sat, Nov 28, 2009
A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers Read More
What is the difference between an interface and abstract class?
Added on Sat, Nov 28, 2009
In the interface all methods must be abstract; in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes. Read More
What is an abstract class?
Added on Sat, Nov 28, 2009
A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it is a blueprint for a class without any implementation. _break Read More
Who is a protected class-level variable available to??
Added on Sat, Nov 28, 2009
It is available to any sub-class (a class inheriting this class). Read More
What’s the difference between System.String and System.Text.StringBuilder classes??
Added on Sat, Nov 28, 2009
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. Read More
What’s the C-sharp syntax to catch any possible exception??
Added on Sat, Nov 28, 2009
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}. Read More
What is the syntax to inherit from a class in C-sharp?
Added on Sat, Nov 28, 2009
Place a colon and then the name of the base class. Example: class MyNewClass : MyBaseClass Read More
Explain the three services model commonly know as a three-tier application?
Added on Sat, Nov 28, 2009
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources). Read More
Can you prevent your class from being inherited by another class??
Added on Sat, Nov 28, 2009
Yes. The keyword “sealed” will prevent the class from being inherited. Read More
What’s the implicit name of the parameter that gets passed into the set method/property of a class??
Added on Sat, Nov 28, 2009
Value. The data type of the value parameter is defined by whatever data type the property is declared as. Read More
How is method overriding different from method overloading??
Added on Sat, Nov 28, 2009
When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class. Read More
Can you declare an override method to be static if the original method is not static??
Added on Sat, Nov 28, 2009
No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to keyword override) Read More
What are the different ways a method can be overloaded??
Added on Sat, Nov 28, 2009
Different parameter data types, different number of parameters, different order of parameters. Read More
Explain ACID rule of thumb for transactions??
Added on Sat, Nov 28, 2009
A transaction must be: 1. Atomic - it is one unit of work and does not dependent on previous and following transactions. ... Read More
Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted??
Added on Sat, Nov 28, 2009
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction. Read More
How is the DLL Hell problem solved in .NET??
Added on Sat, Nov 28, 2009
Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly. Read More
directcast(123.34,integer) - should it throw an error? Why or why not?
Added on Sat, Nov 28, 2009
It would throw an InvalidCast exception as the runtime type of 123.34 (double) doesnt match with Integer. Read More
Difference between a sub and a function.
Added on Sat, Nov 28, 2009
Answer1 A Sub does not return anything whereas a Function returns something. Answer2 -A Sub Procedure is a method will not return a value -A sub procedure will be defined with a “Sub” keyword Sub ShowName... Read More
Difference between value and reference type. what are value types and reference types?
Added on Sat, Nov 28, 2009
Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort Value types are stored in the Stack Reference type - class, delegate, interface, object, string Reference types... Read More
What are the two kinds of properties.
Added on Sat, Nov 28, 2009
Two types of properties in .Net: Get and Set Read More
Explain constructor.
Added on Sat, Nov 28, 2009
Constructor is a method in the class which has the same name as the class (in VB.Net its New()). It initializes the member attributes whenever an instance of the class is created. Read More
Describe ways of cleaning up objects.
Added on Sat, Nov 28, 2009
Answer1 There is a perfect tool provide by .net frameworks calls Garbage collector, where by mean of GC we can clean up the object and reclaim the memory. The namespace used is System.GC Answer2 the run time will... Read More
How can you clean up objects holding resources from within the code?
Added on Sat, Nov 28, 2009
Call the dispose method from code for clean up of objects Read More
Describe the accessibility modifier “protected internal”?
Added on Sat, Nov 28, 2009
It is available to classes that are within the same assembly and derived from the specified base class. Read More
1.What’s the difference between the System.Array.CopyTo() and System.Array.Clone()??
Added on Sat, Nov 28, 2009
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies... Read More
1.How can you sort the elements of the array in descending order?
Added on Sat, Nov 28, 2009
By calling Sort() and then Reverse() methods. Read More
What standard types does C-sharp use?
Added on Sat, Nov 28, 2009
C# supports a very similar range of basic types to C++, including int, long, float, double, char, string, arrays, structs and classes. In C# Types The names may be familiar, but many of the details are different. For example, a long... Read More
What is the syntax to inherit from a class in C-sharp??
Added on Sat, Nov 28, 2009
Place a colon and then the name of the base class. Example: class DerivedClassName: BaseClassName Read More
How can I make sure my C-sharp classes will interoperate with other .Net languages?
Added on Sat, Nov 28, 2009
Make sure your C# code conforms to the Common Language Subset (CLS). To help with this, add the [assembly: CLSCompliant (true)] global attribute to your C# source files. The compiler will emit an error if you use a C# feature which is... Read More
Does C-sharp support variable argument on method?
Added on Sat, Nov 28, 2009
The params keyword can be applied on a method parameter that is an array. When the method is invoked, the elements of the array can be supplied as a comma separated list.So, if the method parameter is an object array, void... Read More
What’s the difference between const and readonly?
Added on Sat, Nov 28, 2009
Readonly fields are delayed initalized constants. However they have one more thing different is that; When we declare a field as const it is treated as a static field. where as the Readonly fields are treated as normal class variables... Read More
What is the difference about Switch statement in C-sharp?
Added on Sat, Nov 28, 2009
No fall-throughs allowed. Unlike the C++ switch statement, C# does not support an explicit fall through from one case label to another. If you want, you can use goto a switch-case, or goto default. case 1: cost += 25; ... Read More
What is the difference between a static and an instance constructor?
Added on Sat, Nov 28, 2009
An instance constructor implements code to initialize the instance of the class. A static constructor implements code to initialize the class itself when it is first loaded. Read More
Assume that a class, Class1, has both instance and static constructors. Given the code below, how many times will the static and instance constructors fire?
Added on Sat, Nov 28, 2009
Class1 c1 = new Class1(); Class1 c2 = new Class1(); Class1 c3 = new Class1(); By definition, a static constructor is fired only once when the class is loaded. An instance constructor on the other hand is fired... Read More
In which cases you use override and new base?
Added on Sat, Nov 28, 2009
Use the new modifier to explicitly hide a member inherited from a base class. To hide an inherited member, declare it in the derived class using the same name, and modify it with the new modifier. Read More
You have one base class virtual function how will you call the function from derived class?
Added on Sat, Nov 28, 2009
class a { public virtual int m() { return 1; } } class b:a { public int j() { return m(); } } Read More
Can we call a base class method without creating instance?
Added on Sat, Nov 28, 2009
It is possible if it’s a static method. It is possible by inheriting from that class also.It is possible from derived classes using base keyword. Read More
What is Method Overriding? How to override a function in C-sharp?
Added on Sat, Nov 28, 2009
Method overriding is a feature that allows you to invoke functions (that have the same signatures) that belong to different classes in the same hierarchy of inheritance using the base class reference. C# makes use of two keywords:... Read More
1.What is an Abstract Class?
Added on Sat, Nov 28, 2009
A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation. Read More
Describe the accessibility modifier “protected internal”??
Added on Sat, Nov 28, 2009
It is available to classes that are within the same assembly and derived from the specified base class. Read More
What is an indexer in C-sharp?
Added on Sat, Nov 28, 2009
The indexers are usually known as smart arrays in C# community. Defining a C# indexer is much like defining properties. We can say that an indexer is a member that enables an object to be indexed in the same way as an array. ... Read More
What is the use of fixed statement?
Added on Sat, Nov 28, 2009
The fixed statement sets a pointer to a managed variable and “pins” that variable during the execution of statement. Without fixed, pointers to managed variables would be of little use since garbage collection could relocate... Read More
What is the order of destructors called in a polymorphism hierarchy?
Added on Sat, Nov 28, 2009
Ans.Destructors are called in reverse order of constructors. First destructor of most derived class is called followed by its parent’s destructor and so on till the topmost class in the hierarchy. You don’t have control... Read More
What is a virtual method?
Added on Sat, Nov 28, 2009
Ans.In C#, virtual keyword can be used to mark a property or method to make it overrideable. Such methods/properties are called virtual methods/properties.By default, methods and properties in C# are non-virtual. Read More
Is it possible to Override Private Virtual methods?
Added on Sat, Nov 28, 2009
No, First of all you cannot declare a method as ‘private virtual’. Read More
Can I call a virtual method from a constructor/destructor?
Added on Sat, Nov 28, 2009
Yes, but it’s generally not a good idea. The mechanics of object construction in .NET are quite different from C++, and this affects virtual method calls in constructors.C++ constructs objects from base to derived, so when the... Read More
How do I declare a pure virtual function in C-sharp?
Added on Sat, Nov 28, 2009
Use the abstract modifier on the method. The class must also be marked as abstract (naturally). Note that abstract methods cannot have an implementation (unlike pure virtual C++ methods). Read More
Are all methods virtual in C-sharp?
Added on Sat, Nov 28, 2009
No. Like C++, methods are non-virtual by default, but can be marked as virtual. Read More
What is the difference between shadow and override?
Added on Sat, Nov 28, 2009
When you define a class that inherits from a base class, you sometimes want to redefine one or more of the base class elements in the derived class. Shadowing and overriding are both available for this purpose. Comparison It... Read More
Should I make my destructor virtual?
Added on Sat, Nov 28, 2009
A C# destructor is really just an override of the System.Object Finalize method, and so is virtual by definition Read More
Are C-sharp destructors the same as CPP destructors?
Added on Sat, Nov 28, 2009
No. They look the same but they are very different. The C# destructor syntax (with the familiar ~ character) is just syntactic sugar for an override of the System.Object Finalize method. This Finalize method is called by the garbage... Read More
Are C-sharp constructors the same as CPP constructors?
Added on Sat, Nov 28, 2009
Very similar, but there are some significant differences. First, C# supports constructor chaining. This means one constructor can call another:class Person { public Person( string name, int age ) { … } public Person(... Read More
Can you declare a CPP type destructor in C-sharp like ~MyClass()?
Added on Sat, Nov 28, 2009
Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector. The only time the finalizer should be... Read More
What are the fundamental differences between value types and reference types?
Added on Sat, Nov 28, 2009
C# divides types into two categories - value types and reference types. Most of the intrinsic types (e.g. int, char) are value types. Structs are also value types. Reference types include classes, arrays and strings. The basic idea is... Read More
How do you handle errors in VB.NET and C-sharp?
Added on Sat, Nov 28, 2009
C# and VB.NET use structured error handling (unlike VB6 and earlier versions where error handling was implemented using Goto statement). Error handling in both VB.NET and C# is implemented using Try..Catch..Finally construct (C#... Read More
What is the purpose of the finally block?
Added on Sat, Nov 28, 2009
The code in finally block is guaranteed to run, irrespective of whether an error occurs or not. Critical portions of code, for example release of file handles or database connections, should be placed in the finally block. Read More
Can I use exceptions in C-sharp?
Added on Sat, Nov 28, 2009
Yes, in fact exceptions are the recommended error-handling mechanism in C# (and in .NET in general). Most of the .NET framework classes use exceptions to signal errors. Read More
What’s the C-sharp syntax to catch any possible exception?
Added on Sat, Nov 28, 2009
A catch block that catches the exception of type System. Exception. You can also omit the parameter data type in this case and just write catch {} Read More
Why is it a bad idea to throw your own exceptions??
Added on Sat, Nov 28, 2009
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws... Read More
How to declare a two-dimensional array in C-sharp?
Added on Sat, Nov 28, 2009
Syntax for Two Dimensional Array in C Sharp is int[,] ArrayName; Read More
Structs are largely redundant in CPP .Why does C-sharp have them?
Added on Sat, Nov 28, 2009
In C++, a struct and a class are pretty much the same thing. The only difference is the default visibility level (public for structs, private for classes). However, in C# structs and classes are very different. In... Read More
1.How does one compare strings in C-sharp?
Added on Sat, Nov 28, 2009
In the past, you had to call .ToString() on the strings when using the == or != operators to compare the strings’ values. That will still work, but the C# compiler now... Read More
Where we can use DLL made in C-sharp .Net?
Added on Sat, Nov 28, 2009
Supporting .Net, because DLL made in C#.Net semi compiled version. It’s not a com object. It is used only in .Net Framework As it is to be compiled at runtime to byte code. Read More
If A.equals(B) is true then A.getHashcode & B.gethashcode must always return same hash code.
Added on Sat, Nov 28, 2009
The answer is False because it is given that A.equals(B) returns true i.e. objects are equal and now its hashCode is asked which is always independent of the fact that whether objects are equal or not. So, GetHashCode for both of the... Read More
Is it possible to debug the classes written in other .Net languages in a C-sharp project?
Added on Sat, Nov 28, 2009
It is definitely possible to debug other .Net languages code in a C# project. As everyone knows .net can combine code written in several .net languages into one single assembly. Same is true with debugging. Read More
Does C-sharp has its own class library?
Added on Sat, Nov 28, 2009
Not exactly. The .NET Framework has a comprehensive class library, which C# can make use of. C# does not have its own class library. Read More
Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace??
Added on Sat, Nov 28, 2009
There is no way to restrict to a namespace. Namespaces are never units of protection. But if you’re using assemblies, you can use the ‘internal’ access modifier to restrict access to only within the assembly. ... Read More
Is there an equivalent of exit() or quiting a C-sharp .NET application?
Added on Sat, Nov 28, 2009
Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app. Read More
What optimization does the C-sharp compiler perform when you use the /optimize<pluse>compiler option?
Added on Sat, Nov 28, 2009
The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get... Read More
IS goto statement supported in C-sharp How about Java?
Added on Sat, Nov 28, 2009
Gotos are supported in C# to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality. Read More
What happens when you encounter a continue statement inside for loop?
Added on Sat, Nov 28, 2009
The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop. Read More
what is the main difference between delegate and an event in c#?
Added on Sun, Jan 3, 2010
They aren't the same. An event is an event. A "delegate" assigns a particular event handler to an object instance. Thus, when an object event happens, the proper procedure/method is called. An example might help. I frequently code things so... Read More
What does the keyword virtual mean in the method definition
Added on Sun, Jan 3, 2010
If a base class have a virtual method it means that method must be override by the derived class using override keyword. Read More
Does C# support multiple inheritance?
Added on Sun, Jan 3, 2010
No, Instead of this, we can inheritance the multiple interface, but C++ support multiple inheritance Read More
What is the difference between shadow and override
Added on Sun, Jan 3, 2010
Shadowing :- This is a VB.Net Concept by which you can provide a new implementation for the base class member without overriding the member. You can shadow a base class member in the derived class by using the keyword "Shadows". The method... Read More
What is an object?Define a class.
Added on Sun, Jan 3, 2010
Object is an instance to call the methods and properties of the class. Read More
Which tool is used to browse the classes, structs, interfaces etc. in the BCL?
Added on Sun, Jan 3, 2010
Lurd's Reflecter is tool by which we can see compelete information about the class, its members, functions, their signature and return type also. we may say metadata of any BCL. But It will not show coding, will show only metadata. LURD'S... Read More
What is difference between deep copy & sallow copy?
Added on Sun, Jan 3, 2010
Deep Copy-In Deep Copy it copies entire page or u can say all objects while in Shallow Copy-It Copies the some of the object Read More
How do you choose 1 entry point when C# project has more Main( ) method
Added on Sun, Jan 3, 2010
In one .cs file there may be many classes having Main() method. While making the . exe you can define the class name as an entry point CSC /main:classname filename.cs Read More
Define abstraction,encapsulation,inheritance:with example.
Added on Sun, Jan 3, 2010
Abstraction : Abstraction works by abstracting common parts of objects and merging them into a single abstract class. An abstract class is a parent class that allows inheritance but can never be instantiated. Abstract classes contain one or more... Read More
An assembly can be stored across multiple files?
Added on Sun, Jan 3, 2010
Yes. The manifest inside the assembly will hold the details of all the files. ie it will store the name of the resource file etc. Read More
Applications running in different App Domains can't communicate with each other:
Added on Sun, Jan 3, 2010
Application that are running in different Appplication Domaine can communicate each other. so the answer for the above question is TRUE. Read More
How to convert ocx into DLL
Added on Sun, Jan 3, 2010
you cannot convert OCX to dll becoz dll do not have GUI interfaces .IF your ocx does not have GUI and you have convert manuly by cut and paste from OCX to Dll project Read More
What is true about readonly variable in C# code?
Added on Sun, Jan 3, 2010
B is the right choice. since readonly field can only be initialized at the time of construction of the object. that means if you wanna initialize the readonly property that intialize it inside the constructor. Read More
There can me more than 1 Main() functions in a C# program
Added on Sun, Jan 3, 2010
It is possible to have multiple Main() methods in C# program. But, you have to explicitly identify which Main method is the entry point at the run-time. C++ and Java Programmers, take note that Main starts with capital 'M' and the return... Read More
How we hand sql exceptions? What is the class that handles SqlServer exceptions?
Added on Sun, Jan 3, 2010
SqlExceptionclass is created whenever the .NET Framework Data Provider for SQL Server encounters an error generated from the server. (Client side errors are thrown as standard common language runtime exceptions.) SqlException always contains at... Read More
Which are the important features of IL
Added on Sun, Jan 3, 2010
A) Use of attributes B) Strong data typing C) Object orientation & use of interface Read More
To Configure .Net for JIT activation what do you do
Added on Sun, Jan 3, 2010
Actually JIT activation is required for COM+ components which can be done by setting JustInTimeActivation attribute to true (choice A). For .net applications / components JIT comes in by default. Read More
What happens when a C# project has more than 1 Main methods
Added on Sun, Jan 3, 2010
If the project is compiled using /main switch with the compiler then the project compiles successfully. For example: class A { public static void Main(string[] args) { Console.WriteLine("Main in class A"); } } class B { public... Read More
What happens when you create an arraylist as ArrayList Arr=new ArrayList()
Added on Sun, Jan 3, 2010
Answer A is correct. Once it will reach size 16 addding element in the arraylist, it will be automatically double the size. Read More
Can static methods be overridable?
Added on Sun, Jan 3, 2010
Static method cannot be overridden. Look into the following code: package javabeat.net; public class ParentClass { public void method1(){ System.out.println("Parent Method1"); } public static void method2(){ System.out.println("Parent... Read More
What is delegates ?
Added on Sun, Jan 3, 2010
Delegates holds the reference to the method. Read More
What is object pooling
Added on Sun, Jan 3, 2010
Defination: A performance optimization based on using collections of pre-allocated resources, such as objects or database connections With the advent of the .NET platform, writing code that pools objects and threads has become a simple task. By... Read More
What is Thread?Use of Threads in c#.
Added on Sun, Jan 3, 2010
Thread is nothing more than a process.On the computer thread is a process moving through time.Thread is analogous to the operating system process in which your application runs.Every application runs with atleast one thread.Threads run parallel... Read More
How to use HASH TABLE,ARRAYLIST in c# explain with example?
Added on Sun, Jan 3, 2010
The ArrayList object is a collection of items containing a single data value. Items are added to the ArrayList with the Add() method. The following code creates a new ArrayList object named mycountries and four items are added: <script runat=... Read More
Interfaces provide implementation of methods
Added on Sun, Jan 3, 2010
You should be aware, however, that it is not permitted to supply implementations of any of the members of an interface. This is a line of C# Professional 3rd edition book pressed wrox Page No 124 So it is not posible to implement methods... Read More
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write
Added on Sun, Jan 3, 2010
Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there is no implementation in it. Read More
Which of the following application need not to have an entry point
Added on Sun, Jan 3, 2010
Assemblies may or may not be executables. exe or dllclass modules had no entry pont.entry point means public void static main() method Read More
X=X+1 is equivalent to
Added on Sun, Jan 3, 2010
The Answer is A X++ as it is the next increment value of X and X+=1 is it shows the initial value of X and then again an incremented value where as X= X+1 is only equal to X++. Read More
What is Boxing?
Added on Sun, Jan 3, 2010
conversion of reference types to value types Read More
Assemblies are of the following types:
Added on Sun, Jan 3, 2010
there are three types of assemply. 1. private - used by single app. 2. public/shared - used by more than one applications 3. Satelite - contains culture informations Read More
What is CLS?
Added on Sun, Jan 3, 2010
The Common Language Specification (CLS) describes a set of features that different languages have in common. The CLS includes a subset of the Common Type System (CTS). Read More
IL code compiles to
Added on Sun, Jan 3, 2010
Every statement in C# must end in
Added on Sun, Jan 3, 2010
every statement in c sharp must end with semi colon.it indicates statement completed. Read More
How do you inherit from a class in C#?
Added on Sun, Jan 3, 2010
let's you have 2classes Class A is the base class Class B is the derived class Class B:A is the syntax to inherit a base class Read More
What is the main difference between pointer and delegate with examples?
Added on Sun, Jan 3, 2010
A Delegate in c# allows to pass a method of class to object of other class. Rules in Deligation:- 1.In order to create a Delegate a Signature(parameter) must match Signature of object. 2.Define all the methods which has the same Signature... Read More
It is not possible for a delegate to wrap more than 1 methos
Added on Sun, Jan 3, 2010
False In some cases you may want to call not just one, but two or more methods through a single delegate. This is known as multicasting. You accomplish multicasting by encapsulating the various methods in delegates, and then you combine the... Read More
Give me Change syntax of color change
Added on Sun, Jan 3, 2010
Question : Give me Change syntax of color change (1)Background color (2)font color (3)size of font Answers: Suppose you have a label having name is label1 then code is as follows For background color: label1.Style... Read More
In the following cases which is not function overloading
Added on Sun, Jan 3, 2010
Answer is A) Same parameter types but different return values. Function overloading depends on the 1) parameter types 2) number of parameters 3) order of parameters Read More
Describe the accessibility modifier protected internal
Added on Sun, Jan 3, 2010
ans: It's available to derived classes and classes within the same Assembly (and naturally from the base class it's declared in). Read More
How's method overriding different from overloading
Added on Sun, Jan 3, 2010
overriding keyword cahnge behavour in derive class with same signature, Overloading means same name but passing different datatype or different number arguments within the same class Read More
GetEnumerator( ) of Ienumerable interface returns
Added on Sun, Jan 3, 2010
GetEnumerator() returns a reference to System.Collections.Ienumerator class which allows a simple iteration over a collection Read More
How to create and manage files in c#?
Added on Sun, Jan 3, 2010
using System.IO namespace and FileStream and StreamWriter classes. Read More
What is server code and client code?
Added on Sun, Jan 3, 2010
Client Side: This is code/routines that are not processed at all by the server. Code is written in scripts (javascript usually) - plain text commands that instruct the client to do something. Generally used for performing dynamic effects, such as... Read More
What is an indexer in C#
Added on Sun, Jan 3, 2010
A) Indexer is a special syntax for overloading [] operator for a class. After defining an indexer, array syntaxes can be used for the class objects. Read More
The methods which can be called without instantiating an object first are called
Added on Sun, Jan 3, 2010
A) Static methods and fields of a class can be used without creating an object. The syntax is A.x() where A is the class name and x() is a static method contained in it. Read More
Why we can not do the declaration in the class?
Added on Sun, Jan 3, 2010
Well we can go for declaring the data members inside the class but not defining them that is we can't initialize the data members.The reason is, memory is allocated only when an object of the class is created.Thus inside the class if we go for... Read More
If you need your own implementation of Equals method of object what needs to be done
Added on Sun, Jan 3, 2010
Ans: B In the System.Object class, equals() is defined as public virtual bool Equals(object obj); Read More
Why we using in header file using system and more header file is in C# what is difference between and all header file ?
Added on Sun, Jan 3, 2010
we are using "using" for compiler make it easier to qualify an identifier to a namespace or class. and dotnet Framework has a list of the system-defined namespaces to identify system namespace we are using "System" example: using System; Read More
It is not possible to debug the classes written in other .Net languages in a C# project.
Added on Sun, Jan 3, 2010
Answer is (B) False: It is definitely possible to debug other .Net languages code in a C# project. As everyone knows .net can combine code written in several .net languages into one single assembly. Same is true with debugging. Read More
Which of the following is not a subclass of Value Type class
Added on Sun, Jan 3, 2010
ValueType a STRUCTURE not a CLASS. Boxed types are not value types. Read More
.NET run time relies on the object reference counts to manage memory
Added on Sun, Jan 3, 2010
Unlike COM, the common language runtime does not use reference counting to govern object lifetime. Instead, the garbage collector traces object references and identifies objects that can no longer be accessed by running code. Read More
What are Namespaces
Added on Sun, Jan 3, 2010
Group of classes categorized to avoid name clash Read More
What happens if we refer a variable which in not initialized in C#
Added on Sun, Jan 3, 2010
If the variable is class variable then it will be assigned the default value(in case of integer it is 0). But if the variable is a local variable (like variable declared inside a function) and not initialized then the compiler will throw an error... Read More
Which of the member is not a member of Object
Added on Sun, Jan 3, 2010
Followings are the member of System.Object Equals() GetHashCode() GetType() Object() ReferenceEquals ToString Read More
The condition for If statement in C# is enclosed with in
Added on Sun, Jan 3, 2010
Ans: A, we use () to enclose the condition with if statement Read More
Which of the following is wrong with regards to Out keyword
Added on Sun, Jan 3, 2010
If Out parameters are not assigned a value with in the function body compiler throws error Read More
How do you determine the size required by a Value type on the stack
Added on Sun, Jan 3, 2010
Ans. B) Sizeof operator The sizeof operator is used to obtain the size in bytes for a value type. A sizeof expression takes the form: sizeof(type) where type is the value type of which the size is obtained Read More
Difference between shadow and override?
Added on Sun, Jan 3, 2010
I find this table from MSDN to be useful to explain differences between shadowing and overriding: The main constraint on overriding is that it needs permission from the base class with the 'overridable' keyword. Shadowing does not require... Read More
All the variables local to a method in C# must be initialized before they can be used
Added on Sun, Jan 3, 2010
True: All local variables in a method must be initialized before using them. However, data member variables of a class are assigned default values even if the programmer does not explicitly initialize them. The defaults are zero for numeric types,... Read More
The field variables in a class or a struct in C# are by default given a value of zero
Added on Sun, Jan 3, 2010
A value-type field variable is initialized to its default value, which is equal to the value computed by the value type's default constructor. A reference type field variable is initialized to its default value, which is null. All numeric... Read More
Which of the following is the correct way to instantiate an object in C#:
Added on Sun, Jan 3, 2010
Ans: B) objThis = new ThisObject(); C) objThis = new ThisObject(); Read More
A local C# variable declared in the for loop is in scope in
Added on Sun, Jan 3, 2010
a local variable in c# which is declared in for loop is in local scope as for as the body of loop closes the scope closes too Read More
bool data type in C# is
Added on Sun, Jan 3, 2010
A struct is a
Added on Sun, Jan 3, 2010
Struct is a user defined datatype that can contains multiple datatypes.This gives it an extra edge over arrays because we don't have to create multiple arrays for stroing different values Read More
An int in C# is
Added on Sun, Jan 3, 2010
B, C# support 32-bit signed integer Read More
A char in C# is
Added on Sun, Jan 3, 2010
A char in C# is 16 bits since it incorporates support for unicode. Read More
String is an
Added on Sun, Jan 3, 2010
(B) is correct: string is a predefined reference type. The C# lang specification on MSDN states 'The string type is a sealed class type that inherits directly from object. Instances of the string class represent Unicode character... Read More
Which of the following are predefined reference types in C#?
Added on Sun, Jan 3, 2010
B) and (C): 'object' and 'string' are predefined reference types. 'string' is a sealed class type which inherits directly from object. Read More
What is JIT?
Added on Sun, Jan 3, 2010
just in timeJIT is stands for just in time compiler. it also compiles your application from bytecode to native code or manage code. it'll also responsible for automatic memory management. three types of JIT are available. 1) normal jit. 2)... Read More
Which of these .NET languages has been specefically designed to be used with .NET?
Added on Sun, Jan 3, 2010
Having been a vb4-vb6 hack, VB.NET is NOT rooted in vb6. Sure, some of the keywords are the same, but VB.NET WAS completely rewritten and designed from the ground up for .net. VB.NET is closer to C# then it is to vb6. If that weren't the case... Read More
Following are the features of .NET
Added on Sun, Jan 3, 2010
By the interface we can go for the multiplle inhertiance also so my answer ids corrget for tHAT Read More
All .NET code have to be CLS compliant
Added on Sun, Jan 3, 2010
False: There is facility to add 'unmanaged' code in C# which need not be CLS compliant. Read More
Which of the following is used to denote comments in C#?
Added on Sun, Jan 3, 2010
All are correct, all are supported forms of commenting, it's just that /// is specifically for functionality in XML documentation. Read More
Attributes
Added on Sun, Jan 3, 2010
Used to provide extra information for the compiler Read More
You can derive your own classes from the base class Library
Added on Sun, Jan 3, 2010
Depends on the whether base class is 'sealed'. If it is declared as 'sealed' you can't inherit from it. If it is not marked as sealed then it is possible to derive from a class in the base class library. Read More
Is JIT compiler in .Net is vendor specific?i mean ,can we download it and use in other any language compiler?
Added on Sun, Jan 3, 2010
No answer available currently. Be the first one to reply to this question by submitting your answer from the form below. Read More
To start a Thread, you call the following method
Added on Sun, Jan 3, 2010
Start() Thread thr=new Thread(new ThreadStart(fn1)); thr.Start(); Read More
System is a
Added on Sun, Jan 3, 2010
system is a main base class. through which u can access the properties of other class. namespace is basically collection of class libraries. like system.io. but system is main base class. Read More
Namespaces are used to
Added on Sun, Jan 3, 2010
) Avoid name clashes between data types Read More
You can inherit multiple interfaces in C#
Added on Sun, Jan 3, 2010
Yes,It is possible. Here Example: interface x { //give method } interface y { //Give method } class z:x,y { //implement the interfaces method } Read More
The following type of class can?t be instantiated
Added on Sun, Jan 3, 2010
abstract class cannot be instantiated Read More
What is a multicast delegate
Added on Sun, Jan 3, 2010
a delegate having multiple handlers assigned to it Read More
virtual method can?t be over ridden
Added on Sun, Jan 3, 2010
False.The virtual keyword is needed to specify that a method should override a method (or implementaion an abstract method) of its base class. Read More
Method Overloading and Overriding are the same
Added on Sun, Jan 3, 2010
Method overloading means having two methods with the same name but different signatures in the same scope. These two methods may exist in the same class or one in base class and another in derived class. Method overriding means having a different ... Read More
Are there some features of C# language not supported by .NET?
Added on Sun, Jan 3, 2010
"One important thing to make clear is that C# is a language in its own right. Although it is designed to generate code that targets the .NET environment,it is not itself part of .NET. There are some features that are supported by .NET only and not C#... Read More
Events in C# are impltemented using:
Added on Sun, Jan 3, 2010
Events in C# are implemented by using delegates. Read More
Value Types are stored on the heap
Added on Sun, Jan 3, 2010
Value types are stored on stack and referance types are stored on heaps Read More
Garbage Collector:
Added on Sun, Jan 3, 2010
is responsible for automatic memory management Read More
You can explicitly call the garbage collector
Added on Sun, Jan 3, 2010
true, we can call GC using System.GC.Collect() method. Read More
Any process can be divided into multiple
Added on Sun, Jan 3, 2010
It's actually Application Domains. Application Domains in turn can contain one or more threads. Read More
'Reflection' is used toS
Added on Sun, Jan 3, 2010
Manifest is an area where:
Added on Sun, Jan 3, 2010
Menifest is an area where assembly metadat is stored Read More
Each process in a 32 bit Windows environment has the following amount of virtual memory available:
Added on Sun, Jan 3, 2010
I guess we always have to check Sisira's answers. The opposite to that will be right. Common' its 4GB!!! Read More
What is CTS?
Added on Sun, Jan 3, 2010
What is CLR?
Added on Sun, Jan 3, 2010
What is IL?
Added on Sun, Jan 3, 2010
IL - Intermediate language. which can compile your source code to bytecode in form of metadata. with the help of msil compiler. Read More
Which is the first level of compilation in the .NET languages?
Added on Sun, Jan 3, 2010
CLR converts programing language into micro soft intermediate language.this is the first level of .net compilation. Read More
ASP.NET web pages can be programmed in C#?
Added on Sun, Jan 3, 2010
But...ASP.net can be programmed on C#!! "ASP.NET pages coded in C# constitute an xcellent medium for User Interfaces" ----pg 25, professional C#,3rd edition Read More
The following is a correct call to the Main() function
Added on Sun, Jan 3, 2010
To call a method, you just give the name and parameters. The correct way to call public static void Main() is to use 'Main();'. I'm not sure why the answer isn't C.The proper way to _declare_ the Main(0 function isstatic void Main... Read More
can we inherit the java class in C# class,how?
Added on Sun, Jan 3, 2010
Java Programming language is not supported with .Net Framework hence you cannot inherit javaclass in C# class.Also Java has JavaByte code after compiling similar to MSIL which is similar but cannot inherit due to framework support. Read More
WHAT IS THE ADVANTAGE OF SERIALIZATION
Added on Sun, Jan 3, 2010
Serialization is the process of converting object into byte stream which is useful to transport object(i.e remoting),persisting object(i.e files,database) Read More
Is it mandatory to implement all the methods which are there in abstract class if we inherit that abstract class..?
Added on Sun, Jan 3, 2010
No only function marked as abstract shoud be implemented.the following code runs fine abstract public class base class { public abstract void method1(); public void method2(){Console.WriteLine("Base Method 2");} } public class derivedclass:baseclass ... Read More
When you inherit a protected class-level variable? Who is it available to?
Added on Sun, Jan 3, 2010
Access is limited to the containing class or types derived from it Read More
Assemblies are of the following types
Added on Sun, Jan 3, 2010
An assembly is logical unit of code. it is physically exists in the DLL/ EXE Assemblies of two types private assemblies shared assemblies the assembly which is used by single application is called private assembly shared assembly is known as... Read More
Which keyword is used of specify a class that cannot inherit by other class?
Added on Sun, Jan 3, 2010
By using "sealed" keyword we can restrict a class from inheritence. Read More
What is wrapper class?is it available in c#?
Added on Sun, Jan 3, 2010
Wrapper Classes are the classes that wrap up the primitive values in to a class that offer utility method to access it . For eg you can store list of int values in a vector class and access the class. Also the methods are static and hence you can use... Read More
What is protected internal class in C#
Added on Sun, Jan 3, 2010
Class can be internal not protected or not even protected internal. Class can have only two access modifiers Public and internal. if any field or method having access modifier protected internal then this field available to the others assemblies... Read More
Can u create the instance for abstract classes
Added on Sun, Jan 3, 2010
No we cannot instanciate abstract class we hav to extend it first ex- abstract class A {} class B : A {} Class C { B b=new B; } Read More
Can we use Friend Classes or functions in C# the way we use it in C++
Added on Sun, Jan 3, 2010
No we can not use friend keyword but instead c# provide "internal" keyword for friend Read More
How to find exceptions in database
Added on Sun, Jan 3, 2010
if program successfully complie . but program is not run or execute. then give an exception. Read More
How can objects be late bound in .NET?
Added on Sun, Jan 3, 2010
Instead of using new keyword we can use create object like in this example we are creating object to write in excel sheet through our programexampleImports Excel = Microsoft.Office.Interop.ExcelPrivate Sub Button1_Click(ByVal sender As System.Object,... Read More
How do i read the information from web.config file?
Added on Sun, Jan 3, 2010
string ConStrFromWeb=System.Configuration.ConfigurationSettings.AppSettings["ConStringKey"]; // Here ConStringKey is the key name of connection string in web.config Read More
What Datatypes does the RangeValidator Control support?
Added on Sun, Jan 3, 2010
String, Integer, Double, Date, Currency Read More
Constructor is the method which is implicitly created when ever a class is instantiated. Why?
Added on Sun, Jan 3, 2010
Constructors are class methods that are executed when an object of a given type is created. Constructors have the same name as the class, and usually initialize the data members of the new object Read More
Why strings are immutable?
Added on Sun, Jan 3, 2010
1) In VB6.0 and c++ strings are simple array of bytes, but in .Net it is class System.String and is immutable. 2) A string is a sequential collection of Unicode characters, which usually is used to represent text. A String, on the other hand, is... Read More
What is C# equivalent for this regular expression.
Added on Sun, Jan 3, 2010
Question : This is a Regular expression built for parsing string in vb.net and passed to Regex class. Dim r As Regex = New Regex(",(?=([^""]*""[^""]*"")*(?![^""]*""))") What is C# equivalent for this regular expression. Answers: ... Read More
What is the default Function arguments?
Added on Sun, Jan 3, 2010
Default function argument is a function argument with a default value. Callers of this function have a choice whether to pass a value for default argument or not. If a function call passes a value for default argument it is used as its value. If a... Read More
What is XML Schema
Added on Sun, Jan 3, 2010
Document Type Declaration(DTD) <!DOCTYPE root-element [ doctype-declaration... ]> determines the name of the root element and contains the document type declarations Elements Elements are the main building blocks of both XML and HTML... Read More
How can i check whether a dataset is empty or not in C#.net
Added on Sun, Jan 3, 2010
HasRows property is only for DataReader objects. For DataSet you can check whether it has a DataTable or not .. since the DataSet is a collection of DataTable you can check whether it has loaded a table or not using the following code DataSet dt=new... Read More
Is it possible to inherit a class that has only private constructor
Added on Sun, Jan 3, 2010
No. ex. Base Class: /// Summary description for BaseA. /// </summary> public class BaseA { private BaseA() { // // TODO: Add constructor logic here // } } Dervied Class: ... Read More
The compiler throws an error if XML comments is not well formed
Added on Sun, Jan 3, 2010
If the XML is not well-formed, a warning is generated and the documentation file will contain a comment saying that an error was encountered. For more information on well-formed XML, Read More
Which of the following is not a C# reserved keyword
Added on Sun, Jan 3, 2010
A. is the correct answer bcoz In c# previously i had used in, As,Of keywordas used but i didn'nt used is keyword, plz let me know any further queries. Read More
By declaring a base class function as virtual we allow the function to be overridden in subclasses
Added on Sun, Jan 3, 2010
The derived class can provide new functionality by overriding the virtual method of the base class. The method to be called is determined at the run-time depending on the type of the object calling the method, and it does not depend on the type... Read More
Which of the following can not be declared as virtual
Added on Sun, Jan 3, 2010
Both A and B are correct choices. Declaring a static function as virtual generates build error. Same with declaring member fields as virtual. A static function can be called only using class_name.static_function_name() syntax, so there is no run... Read More
Which of the following statements is not true for interfaces
Added on Sun, Jan 3, 2010
Interfaces must always be declared as public so that they can be implemented or inherited Read More
Interface members can not be declared as
Added on Sun, Jan 3, 2010
D is the correct choice Virtual keyword is meaningful when the derived class is expected to override base class method. Here a class will 'implement' a method of an interface, hence virtual is not meaningful for interface methods. ... Read More
It is not permitted to declare modifier on the members in an interface definition
Added on Sun, Jan 3, 2010
A is the correct answer. By default all the members in an Interface definition are public, so there is no need to declare access modifier public. It would be a compile time error otherwise Read More
Sealed class can be inherited
Added on Sun, Jan 3, 2010
sealed classes cannot be inherited as the sealed classes provides full functionality only the classes that have no full functionality can be inherited Read More
Constructors can not be static
Added on Sun, Jan 3, 2010
C# supports two types of constructor, a class constructor (static constructor) and an instance constructor (non-static constructor). Static constructor is used to initialize static data members as soon as the class is referenced first time,... Read More
It is perfectly legitimate to throw exceptions from catch and finally blocks
Added on Sun, Jan 3, 2010
Answer is (A) True. Catch and finally blocks are just like other code blocks, and you can write any legitimate C# code, including try, throw, catch and finally. Read More
In C# events are actually a special form of delegates
Added on Sun, Jan 3, 2010
False Events are signals generated by an object to indicate occurrence of an action, while delegates are type safe function pointers. An event is a way for a class to signal state change / an interesting action. Delegates are reference types... Read More
How are the attributes specified in C#
Added on Sun, Jan 3, 2010
Ans: A. They are enclosed with in []. Read More
In order to use stringbuilder in our class we need to refer
Added on Sun, Jan 3, 2010
We only need to refer System.Text namespace. StringBuilder Class is contained in the System.Text namespace. hence we need to add the following lines in pur code: using System.Text; Read More
What is the output of Vectors.RemoveAt
Added on Sun, Jan 3, 2010
C) Removes the object at position 1 Read More
How do you add objects to hashtable
Added on Sun, Jan 3, 2010
Actually operator "=" adds an element too. The following example adds key-value pair "x"-"value" to Hashatble h: HashTable h = new HashTable(); h("x") = "value"; Read More
If A.equals(B) is true then A.getHashcode & B.getHashCode must always return same hash code
Added on Sun, Jan 3, 2010
The answer is False because it is given that A.equals(B) returns true i.e. objects are equal and now its hashCode is asked which is always independent of the fact that whether objects are equal or not. So, GetHashCode for both of the objects returns... Read More
What is the first step to do anything with assembly
Added on Sun, Jan 3, 2010
Answer is (A) Load assembly to running process Read More
How do you load assembly to running process
Added on Sun, Jan 3, 2010
C) is correct. Assembly class provides the following methods to load an assembly: Load LoadFrom LoadFile LoadWithPartialName LoadModule Read More
Assemblies cannot be loaded side by side
Added on Sun, Jan 3, 2010
We can load assemblies into GAC more than one version. We can use any version what ever we want. But this is not possible in the case of com. Read More
Where does the version dependencies recorded
Added on Sun, Jan 3, 2010
Answer: A) Inside an assembly?s manifest Read More
c# Interview Questions and Answers,c# Faqs,c# Interview FAQs and c# Books,c# interview ebook,c# technical interview questions,c# Quiz,c# Interview Paper,c# Placement Papers,c#Interview Procedure,c# Aptitude Questions,c# Technical Qauestions,c# Questi
Added on Sun, Jan 3, 2010
In a multilevel hierarchy how are the constructors are called
Added on Sun, Jan 3, 2010
Ans: A--- TopDown Always a parent class constructor is executed before child class' constructor does .. when u instantiate a child/derived class. Read More
Public policy applies to
Added on Sun, Jan 3, 2010
Public policies are applied on Shared Assemblies. Read More
Which of the following has stream as the base class
Added on Sun, Jan 3, 2010
Ans: All the above BufferedStream,MemoryStream and FileStream all these 3 classes are inherited from System.IO.Stream class. Read More
How do you import Activex component in to .NET
Added on Sun, Jan 3, 2010
An application called AXImp. exe shipped with .Net SDK is used. This application does something similar as Tlbimp.exe does for non graphical COM components. It creates a wrapper component that contains the type information that the .Net... Read More
What is the order of destructors called in a polymorphism hierarchy
Added on Sun, Jan 3, 2010
Answer (A) is correct. Destructors are called in reverse order of constructors. First destructor of most derived class is called followed by its parent's destructor and so on till the topmost class in the hierarchy. You don't have... Read More
How can you sort the elements of the array in descending order
Added on Sun, Jan 3, 2010
int[] arr = new int[3]; arr[0] = 4; arr[1] = 1; arr[2] = 5; Array.Sort(arr); Array.Reverse(arr); Read More
Platform specific code is obtained when
Added on Sun, Jan 3, 2010
MSIL code is the intermediate code which is platform independent. When MSIL is compiled actual platform dependent code is generated. Read More
|