Showing posts with label Dotnet. Show all posts
Showing posts with label Dotnet. Show all posts

Wednesday, 22 January 2014

Peopleprime walkins

Freshers Walk-in For Data Processing Executive @ “Peopleprime" in Hyderabad

About Company

Name: Peopleprime

Website: www.people-prime.com

Job Details

Education: BSc/BCom/BBA/BA/BCA/MBA

Experience: 0 - 2 Years

Job Location: Madhapur, Hyderabad

Sunday, 29 September 2013

Interviews

Our Page  https://www.facebook.com/shivashankar4u?ref=tn_tnmn

29 Sept Jobs
• Walk In @ Infosys BPO : Process Executive (voice) : BE, B.Tech, B.Sc, B.Com, BBA, BCA, BA : On 20th September to 31st October 2013
http://www.indiajobsworld.com/2013/09/walk-in-infosys-bpo-process-executive.html
• Walk In @ Capita India For Freshers : BA/B.Com/BCA/B.Sc/BBA/BHM : On 30th September to 4th October 2013
http://www.indiajobsworld.com/2013/09/walk-in-capita-india-for-freshers.html
• Walk In @ Syntel : B.com 2012 & 2013 Batch : Trainee : Mumbai : On 30th September,2013
http://www.indiajobsworld.com/2013/09/walk-in-syntel-bcom-2012-2013-batch.html
• Walk-In @ Nimbus Systems Pvt Ltd For Trainee / Junior – Software Developer / Technical Consultant On 29th September 2013
http://www.indiajobsworld.com/2013/09/walk-in-nimbus-systems-pvt-ltd-for.html
• Walk In @ Spice Jet Limited : Cabin Crew : On 29th September,2013
http://www.indiajobsworld.com/2013/09/walk-in-spice-jet-limited-cabin-crew-on.html
• Multi Industry Job Fair For Freshers & Experienced : Multiple Companies : Multiple Positions On 28th & 29th September 2013
http://www.indiajobsworld.com/2013/09/multi-industry-job-fair-for-freshers.html
• Walk In @ Amazon : Customer Service Associate : On 28th-29th September,2013 @ Hyderabad

Wednesday, 25 September 2013

Walk-in links

Walk-ins 
Every fresher / experince candidate who are looking for they should visit these links at least twice per day . Then there is a chance of getting job in present situation . if you fallow all these links at least you will get one opportunity which suites for your career .. 

Monday, 15 July 2013

LINKS FOR ALL THE MATERIALS

DOWNLOAD LINK FOR ALL THE MATERIALS


So here's is the first material for all you guys, directly download all the materials from the direct links.
  
  
i will keep on updating the Doc and will continuously keep adding the materials for you guys

(1) UNIX COMMANDS

http://www.mediafire.com/?4ya05l3ugwmgt7j

Sunday, 15 July 2012

JAVA .NET FAQ’S


JAVA  .NET FAQ’S
1. What is java.net?
java.net is a premier web-based, open community created to facilitate Java™ technology collaboration in applied areas of technology and industry solutions. java.net is a central gathering place for Java technology enthusiasts and existing communities across industries, platforms, and interest groups.
2. What is the goal of java.net?
The goal is to expand the Java™ technology portfolio of applications, tools, and services by promoting conversation and collaboration around development of practical applications across industry groups.
3. What will developers find on java.net?
On java.net, developers can find and post material related to their specialized needs. Through a variety of collaborative tools such as wikis, weblogs, discussion forums, mail lists, and RSS newsfeeds, as well as traditional open source tools like CVS, java.net allows developers to come to one place to find out the latest news and opinions, have conversations with other developers who share specific interests, and ultimately engage in efficient development efforts using Java™ technology.
4. Is java.net a Sun web site?
java.net was launched by Sun and will be championed and financially sponsored by Sun; the majority of the content will come from companies and individuals outside of Sun.
5. How will Sun benefit from java.net?
A thriving java.net community benefits all active participants, including Sun. By participating in java.net communities, Sun can create better products, establish new business relationships and partnerships, and engage more closely with developers who are committed to using Java™ technology in innovative and creative ways.
6. How is O'Reilly Media involved in java.net?
In order to ensure the Java™ technology community is broadly represented, Sun has arranged for renowned publisher O'Reilly Media (www.oreilly.com) to be the feature editor for java.net. O'Reilly will solicit and manage the news features and highlighted webloggers that are presented on the opening pages of java.net.
7. How is CollabNet involved in java.net?

Sunday, 8 July 2012

C Sharp Interview Questions



C# INTERVIEW QUESTIONS
What’s the implicit name of the parameter that gets passed into the class’ set method?
Value, and it’s datatype depends on whatever variable we’re changing.
How do you inherit from a class in C#?
Place a colon and then the name of the base class. Notice that it’s double colon in C++.
Does C# support multiple inheritance?
No, use interfaces instead.
When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
Are private class-level variables inherited?
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
Describe the accessibility modifier protected internal.
It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
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?
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.
What’s the top .NET class that everything is derived from?
System.Object.
How’s method overriding different from overloading?

Saturday, 7 July 2012

.NET Interview Questions and Answers


Questions and Answers
Chapter 1:Introduction to Web Programming
1.      Give three examples of how an ASP.NET Web application is different from a traditional Windows application.
Web applications and traditional Windows applications have the following differences:
Feature
ASP.NET Web application
Unmanaged Windows application
Architecture
Client/server.
Local user.
Execution
Runs under common language runtime using managed code.
Runs under Windows using unmanaged code.
User interface
User interface is displayed in an Internet browser using Web Forms.
User interface is displayed by the application using the Win32 API.
2.      What are the two main parts of the .NET Framework?
o    The common language runtime
o    The .NET Framework class library
o     
3.      How do you restore the default window settings in Visual Studio .NET?
From the Tools menu, choose Options and then click Reset Window Layout.
4.      Why doesn' t the Visual Studio .NET Code Editor automatically complete the following partial line of code (Visual C# users only)?
int intX = system.math
The namespace System.Math must be capitalized in Visual C# for IntelliSense to recognize the namespace.
5.      When can' t you use ASP.NET to create a Web application?
When you are developing for non-Microsoft Windows Web servers, such as Linux/Apache.
Chapter 2:Creating Web Forms Applications
1.      Explain where Visual Studio .NET stores Web application projects.
Web application projects are stored in a new virtual folder for each project. The properties of that virtual folder determine where the files are physically stored. These properties can be viewed in IIS.
2.      List the four major differences between Web and Windows applications.

Data Base interview Questions


Data Base interview Questions



SQL Server:
  
  1. Explain Third normalization form with an example
  2. If a user doesnt have a permission on a table, but he has permission to a view created on it, will he be able to view the data in table?
  3. Describe Application Role and explain a scenario when you will use it?
  4. Both a UNIQUE constraint and a PRIMARY KEY constraint enforce uniqueness, so when you should use UNIQUE Constraint?
  5. What is the difference between the REPEATABLE READ and SERIALIZE isolation levels?
  6. Why one should not prefix user stored procedures with sp_?
  7. You have several tables, and they are joined together for querying. They have clustered indexes and non clustered indexes. To optimize the performance how you will distribute the tables and their indexes on different file Groups?
  8. Which event (Check constraints, Foreign Key, Rule, trigger, Primary key check) will be performed last for integrity check ?
  9. After removing a table from database, what other related objects have to be dropped explicitly ?

Friday, 25 May 2012

Visual Basic Interview Questions and Answers


Visual Basic Interview Questions and Answers


How do you register a component?
Compiling the component, running REGSVR32 MyDLL.dll
Name and explain the different compatibility types when creating a COM component 
No Compatibility ? New GUID created, references from other components will not workProject Compatibility ? Default for a new component Binary Compatibility ? GUID does not change, references from other components will work
Why is it important to use source control software for source code? 
Modification history.Code ownership: Multiple people can not modify the same code at the same time.
What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful? 
SetComplete and SetAbort.
 
What is the tool used to configure the port range and protocols for DCOM communications? 
DCOMCONFIG.EXE
What does Option Explicit refer to? 
All variables must be declared before use. Their type is not required.
What are the different ways to Declare and Instantiate an object in Visual Basic 6?
Dim obj as OBJ.CLASS with eitherSet obj = New OBJ.CLASS orSet obj = CreateObject(OBJ.CLASS?) orSet obj = GetObject( , OBJ.CLASS?)orDim obj as New OBJ.CLASS
Name the four different cursor types in ADO and describe them briefly. 
The cursor types are listed from least to most resource intensive.Forward Only Fastest, can only move forward in recordset Static Can move to any record in the recordset. Data is static and never changes.KeySet Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detectedDynamic ? All changes are visible.
Name the four different locking type in ADO and describe them briefly. 
LockPessimistic Locks the row once after any edits occur.LockOptimistic Locks the row only when Update is called.LockBatchOptimistic Allows Batch Updates.LockReadOnly Read only. Can not alter the data.
Describe Database Connection pooling (relative to MTS )? 
This allows MTS to reuse database connections. Database connections are put to sleep as opposed to being created and destroyed and are activated upon request. 
What are the ADO objects? 
Provide a scenario using three of them to return data from a database. Expected answer: Connection Connects to a data source; contains the Errors collectionCommand Executes commands to the data source. Is the only object that can accept parameters for a stored procedure.Recordset The set of data returned from the database.Scenario: There are many possibilities. The most likely is as follows:Dim conn As ADODB.ConnectionDim rs As ADODB.RecordsetDim Cmd As ADODB.Commandconn.ConnectionString = ?CONNECTION STRING?conn.OpenSet Cmd.ActiveConnection = connCmd.CommandText = ?SQL STATEMENT?Set rs = Cmd.ExecuteSet rs.ActiveConnection = Nothingconn.Close
Under the ADO Command Object, what collection is responsible for input to stored procedures? 
The Parameters collection.
What are some benefits of using MTS?
Database Pooling, Transactional operations, Deployment, Security, Remote Execution.
What is the benefit of wrapping database calls into MTS transactions? 
If database calls are made within the context of a transaction, aborting the transaction will undo and changes that occur within that transaction. This removes the possibility of stranded, or partial data.
Describe and In Process vs. Out of Process component. Which is faster? 
An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component.Each client app that uses the component starts a new instance of it.An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients.
What are the main components of the ADO object model? How are they used? 
Connection: Used to make a connection between your app and an external data source, ie, sql server.Command: Used to build queries, including user-specific parameters, to access records from a data source (which are returned in a Recordset)Recordset:Used to access records returned from an SQL query. With a recordset, you can navigate returned records. You can also add, modify or delete records.
Can We create CGI scripts in VB?? 
Yes.
Dim x, y as integer. What is x and y data type? 
X as variant and y as integer.
What is Centralization Error Handling? 
Writing function and calling it when error occurs.
What is frx? 
When some controls like grid and third party control placed in our application then it will create frx in run time.
What is the Dll required for running the VB? 
Vbrun300.dll
Why we use Treeview Control? 
To list the hierarchical list of the node objects. Such of files and Directories.
Handling Error in Calling chain. 
This will call the top most error where the error is handled.
In project properties if we set Unattended what is it mean? 
This cannot have user interface. This can be used for the COM creation.
What is the size of the variant data type? 
The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length),and can store any character text.
What is view Port?
The area under which the container provides the view of the ActiveX Document is known as a view port. 
What are the different types of error? 
Syntax Errors, Runtime , Logic.
What is the diff between the Std and Class Module? 
Std Global with in the project. Cls Global through out the all project only thing is we want to set the type lib. Class Modules can be Instantiated.
What is Mixed Cursors? 
Static + Keyset
Drag and Drop state numbers and functions? 
State 0 Source control is being dragged with the range of a target.
1 Out of the range of a target.
2 One position in the target to another.
What are the Style Properties of Combo Box? 
Simple, Dropdown list We can type and select. Dropdown Combo Only Drop Down.
What are the Style properties of List Box? 
Simple Single Select , Extended. Multiple Select.
What is Collection Objects? 
Similarly to arrays but is preferred over an array because of the following reasons.
1. A collection objects uses less Memory than an array.
2. It provides methods to add and delete members.
3. It does not required reason statement when objects are added or deleted.
4. It does not have boundary limitations.
What is the difference between Property Get, Set and Let? 
Set Value is assigned to ActiveX Object from the form.
Let Value is retried to ActiveX Object from the form.
Get- Assigns the value of an expression to a variable or property.
How to change the Mouse Pointer? 
Screen.MousePointer = VBHourGlass/VBNormal.
What is Friend Variable? 
Scope sharable between projects.
What is DBFailError? 
Rolls Back updates if any errors Occurs.
What are the record set types? 
RdOpenFowardOnly 0 (Default used only for the read only purpose)
RdOpenStatic 1
RdOpenDynamic 2
RdOpenKeySet 3 (Normally used for the live project)
What is the diff between RDO and ADO? 
RDO is Hierarchy model where as ADO is Object model. ADO can access data from both flat files as well as the data bases. I.e., It is encapsulation of DAO, RDO , OLE that is why we call it as OLE-DB Technology.
Diff types of Lock Types? 
RdConcurReadOnly 0 (Default)
RdConcurLock 1 (Pessimistic Locking)
RdConcurRowver 2 (Optimistic Lociking)
RdConcurValues 3
RdConcurBatch 4
What are the scopes of the class?
Public, private, Friend
Have you create Properties and Methods for your own Controls? 
Properties Public variable of a Class
Method Public procedure of a class
Private Dim x as integer. Valid ? 
Private cannot be used in front of DIM.
Different type of Instantiation? 
Private Only for the Specific Module.
Public not creatable Private & Public
Multi Use - Variable we have to declare.
Single Use Not possible through dll.
Global Multiuse Have variable not Required to Declare.
Global Single Use - Only for exe.
What are the different types of Dialog Box? 
Predefined, Custom, User Defined.
 
What is Seek Method which type of record set is available this? 
Only in DbOpenTables.
Syntax: rs.index = "empno"
rs.seek "=" , 10
If with our setting the rs.index then run time error will occur.
What is Zorder Method? 
Object.Zorder = 1 or 0 Place a Specified mdiform form or control at the front or back of the z-order with n its Graphical Level.
Can us able to set Instancing properties like Singleuse, GlobalSingleuse to ActiveXDll? 
No.
What are properties available in Clip Board? 
No Properties Available. Only the methods they are SetText, GetText, Setdata(), Getformat(), Clear.
What is the different between Microsoft ODBC Driver and Oracle OBDC Driver? 
Microsoft ODBC driver will support all the methods and properties of Visual Basic. Where as the Oracle not.
What the RDO Methods and Events? 
Methods Events
Begin Trans Validate
Commit Trans Reposition
Rollback Trans Error
Cancel Query Complied
Refresh
Update Controls
Update row
What is MAPI ? 
Messaging Application programming Interface.
What is MDI form? 
MDI Styles
What are the locks available in Visual Basic?
Locking is the process by which a DBMS restricts access to a row in a multi-user environment 4 types of locks. They are
1. Batch Optimistic
2. Optimistic
 
3. Pessimistic
4. ReadOnly
 
Operations in a relational database act on a complete set of rows. The set of rows returned by a SELECT statement consists of all the rows that satisfy the conditions in the WHERE clause of the statement. This complete set of rows returned by the statement is known as the result set.
 
Applications, especially those that are interactive and online, cannot always work effectively with the entire result set as a unit.
These applications need a mechanism to work with one row or a small block of rows at a time. Cursors are an extension to result sets that provide that mechanism.
 
Cursor or lock type Advantages Disadvantages AdOpenForwardOnly (Default) Low resource requirements Cannot scroll backward No data concurrency AdOpenStatic Scrollable (Wont detect changes made at the same time by another application) No data concurrency AdOpenKeyset Some data concurrency Scrollable Higher resource requirements Not available in disconnected scenario AdOpenDynamic High data concurrency Scrollable Highest resource requirements Not available in disconnected scenario AdLockReadOnly Low resource requirements Highly scalable Data not updatable through cursor AdLockBatchOptimistic Batch updates Allows disconnected scenarios Other users able to access data Data can be changed by multiple users at once AdLockPessimistic Data cannot be changed by other users while locked Prevents other users from accessing data while locked AdLockOptimistic Other users able to access data Data can be changed by multiple users at once
Diff type of Datatypes? 
LOB (Large Object Data type).
CLOB (Stores Character Objects).
BLOB ( Store Binary Objects such as Graphic, Video Chips and Sound files).
BFILE(Store file pointers to LOB It may Contain filename for photo’s store on CD_ROM).
What is Tabstrip control? 
Libraries of procedure external to the application but can be called from the application.
What is Static Variable? 
Its Scope will be available through out the life time.
What is DBSqlPassThrough? 
It will By Passing the Jet Query Processor.
What is the starting Index value? How to locate it? 
It is tab control to place our controls with in the form in multiple sheets.
Index starts with 1.
 
And to identify If Tabstrip1.SelectedItem.
Index = 1 Then ..
End if
 
What is Parser Bug? 
It is difficult to use database objects declared in a module from within a form.
What is keyword used to compare to objects? 
ISOperator Returns Boolean.
Suppose from form1 to form2 object property settings will arise to ? 
Invalid procedure call or argument (Run time error 5)
What is the return type of Instr and Strcmp? 
Instr integer (Numeric position)
Strcmp - integer ( if both the string are equal they result = 0)
Strcmp (Str1, Str2, Comparetype)
Comparing mode = 0 Binary Comparing
1 Textual Comparing
What is Implicit? 
Instance of specific copy of a class with its own settings for the properties defined in that class.
Note: The implicitly defined variable is never equal to nothing.

C# Interview Questions and Answers


C# Interview Questions and Answers



What's C# ?
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.
Is it possible to inline assembly or IL in C# code? 
- No.
Is it possible to have different access modifiers on the get/set methods of a property? 
- 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 method that is separate from the property.
Is it possible to have a static indexer in C#? allowed in C#. 
- No. Static indexers are not
If I return out of a try/finally in C#, does the code in the finally-clause run? 
-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.WriteLine(\"In Try block\");
return;
}
finally
{
Console.WriteLine(\"In Finally block\");
}
}
} 

Both In Try block and In Finally block will be displayed. Whether the return is in the try block or after the try-finally block, performance is not affected either way. The compiler treats it as if the return were outside the try block anyway. If it’s a return without an expression (as it is above), the IL emitted is identical whether the return is inside or outside of the try. If the return has an expression, there’s an extra store/load of the value of the expression (since it has to be computed within the try block).
 
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?
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) { }
How does one compare strings in C#? 
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 when the == or != operators are used on string types. If you actually do want to compare references, it can be done as follows: if ((object) str1 == (object) str2) { } Here’s an example showing how string compares work:
using System; 
public class StringTest
{
public static void Main(string[] args)
{
Object nullObj = null; Object realObj = new StringTest();
int i = 10;
Console.WriteLine(\"Null Object is [\" + nullObj + \"]\n\"
+ \"Real Object is [\" + realObj + \"]\n\"
+ \"i is [\" + i + \"]\n\");
// Show string equality operators
string str1 = \"foo\";
string str2 = \"bar\";
string str3 = \"bar\";
Console.WriteLine(\"{0} == {1} ? {2}\", str1, str2, str1 == str2 );
Console.WriteLine(\"{0} == {1} ? {2}\", str2, str3, str2 == str3 );
}
}

Output:

Null Object is []
Real Object is [StringTest]
i is [10]
foo == bar ? False
bar == bar ? True
How do you specify a custom attribute for the entire assembly (rather than for a class)? 
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-created project, by convention, these attributes are placed in AssemblyInfo.cs.
How do you mark a method obsolete?
[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.
How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C#? 
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);
}
How do you directly call a native function exported from a DLL? 
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()
{
return MessageBoxA(0, \"Hello World!\", \"Caption\", 0);
}
}

This example shows the minimum requirements for declaring a C# method that is implemented in a native DLL. The method C.MessageBoxA() is declared with the static and external modifiers, and has the DllImport attribute, which tells the compiler that the implementation comes from the user32.dll, using the default name of MessageBoxA. For more information, look at the Platform Invoke tutorial in the documentation.
How do I simulate optional parameters to COM calls?
You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. 
What do you know about .NET assemblies? 
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.
What’s the difference between private and shared assembly? 
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.
 
What’s a strong name? 
A strong name includes the name of the assembly, version number, culture identity, and a public key token.
How can you tell the application to look for assemblies at the locations other than its own install? 
Use the directive in the XML .config file for a given application.
< probing privatePath=c:\mylibs; bin\debug />
should do the trick. Or you can add additional search paths in the Properties box of the deployed application.
How can you debug failed assembly binds? 
Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched. 
Where are shared assemblies stored? 
Global assembly cache.
How can you create a strong name for a .NET assembly? 
With the help of Strong Name tool (sn.exe).
 
Where’s global assembly cache located on the system? 
Usually C:\winnt\assembly or C:\windows\assembly.
Can you have two files with the same file name in GAC? 
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 and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0.
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 client applications that are already installed to start using this new MyApp.dll?
Use publisher policy. To configure a publisher policy, use the publisher policy configuration file, which uses a format similar app .config file. But unlike the app .config file, a publisher policy file needs to be compiled into an assembly and placed in the GAC.
What is delay signing? 
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 the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.
Is there an equivalent of exit() for quitting a C# .NET application? 
Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it's a Windows Forms app.
 
Can you prevent your class from being inherited and becoming a base class for some other classes? 
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 Java.
Is XML case-sensitive? 
Yes, so and are different elements.
If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? 
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
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? 
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) { }
How do I make a DLL in C#? 
You need to use the /target:library compiler option.
 
How do I simulate optional parameters to COM calls? 
You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters.
Will finally block get executed if the exception had not occurred? 
Yes.
What is the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? Does C# support try-catch-finally blocks? 
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 block");
throw new ArgumentException();
}
catch(ArgumentException n1)
{
Console.WriteLine("Catch Block");
}
finally
{
Console.WriteLine("Finally Block");
}
}
}
Output: In Try Block
Catch Block
Finally Block

If I return out of a try/finally in C#, does the code in the finally-clause run? 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, as shown in the following 
example: using System;
class main
{
public static void Main()
{
try
{
Console.WriteLine("In Try block");
return;
}
finally
{
Console.WriteLine("In Finally block");
}
}
}

Both "In Try block" and "In Finally block" will be displayed. Whether the return is in the try block or after the try-finally block, performance is not affected either way. The compiler treats it as if the return were outside the try block anyway. If it's a return without an expression (as it is above), the IL emitted is identical whether the return is inside or outside of the try. If the return has an expression, there's an extra store/load of the value of the expression (since it has to be computed within the try block).
Is there regular expression (regex) support available to C# developers?
Yes. The .NET class libraries provide support for regular expressions. Look at the documentation for the System.Text.RegularExpressions namespace.
Is there a way to force garbage collection? 
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 references to the object to null and then calling System.GC.RunFinalizers().
Does C# support properties of array types? 
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(string[] args)
{
Class1 c = new Class1();
string[] arr = new string[] {"apple", "banana"};
c.MyProperty = arr;
Console.WriteLine(c.MyProperty[0]); // "apple"
return 0;
}
}
What connections does Microsoft SQL Server support? 
Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords)
 
What is a satellite assembly? 
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 assemblies.
How is method overriding different from overloading? 
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? 
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.
Why would you use untrusted verification? 
Web Services might use it, as well as non-Windows applications.
What is the implicit name of the parameter that gets passed into the class set method? 
Value, and its datatype depends on whatever variable we are changing.
How do I register my code for use by classic COM clients? 
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, a COM client can use the class as though it were a COM class.
 
How do I do implement a trace and assert? 
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()
{
Debug.Trace("hello");
}
}

In this example, the call to Debug.Trace() is made only if the preprocessor symbol TRACE is defined at the call site. You can define preprocessor symbols on the command line by using the /D switch. The restriction on conditional methods is that they must have void return type.
How do I create a multi language, multi file assembly?
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 these netmodules together.
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? 
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
What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development? 
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 transactions. 

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 updated and something hasnot), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed even if the system crashes right after).
Where is the output of TextWriterTraceListener redirected? 
To the Console or a text file depending on the parameter passed to the constructor. 
How do I create a multilanguage, single-file assembly? 
This is currently not supported by Visual Studio .NET.
Why cannot you specify the accessibility modifier for methods inside the interface? 
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.
Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace? 
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.
 
Why do I get a syntax error when trying to declare a variable called checked? 
The word checked is a keyword in C#.
Why are there five tracing levels in System.Diagnostics.TraceSwitcher? 
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-tune the tracing activities.
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)? 
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 Main() {}
}
Why do I get a "CS5001: does not have an entry point defined" error when compiling? 
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) {}
} 
What does the keyword virtual mean in the method definition? 
The method can be over-ridden.
What optimizations does the C# compiler perform when you use the /optimize+ compiler option? 
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/ an empty try.
We get rid of try-finally w/ an empty try (convert to normal code...).
We get rid of try-finally w/ an empty finally (convert to normal code...).
We optimize branches over branches:
gotoif A, lab1
goto lab2:
lab1:
turns into: gotoif !A, lab2
lab1:
We optimize branches to ret, branches to next instruction, and branches to branches.
How can I create a process that is running a supplied native executable (e.g., cmd.exe)?
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.Start(args[0]);
p.WaitForExit();
Console.WriteLine(args[0] + " exited.");
}
}
Remember to add a reference to System.Diagnostics.dll when you compile.
What is the difference between the System.Array.CopyTo() and System.Array.Clone()? 
The first one performs a deep copy of the array, the second one is shallow.
How do I declare inout arguments in C#? 
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 = "Hello";
MyMethod(ref s1, out s2);
Console.WriteLine(s1);
Console.WriteLine(s2);
Notice that you need to specify ref when declaring the function and calling it.
 
Is there a way of specifying which block or loop to break out of when working with nested loops? 
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++ )
{
if ( j == 10) goto done;
Console.WriteLine("{0} ", j);
}
Console.WriteLine("This will not print");
}
done:
Console.WriteLine("Loops complete.");
}
}
What is the difference between const and static read-only? 
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 can only modify it: -- in the variable declaration (through a variable initializer). 
-- in the static constructor (instance constructors if it's not static).
 
What does the parameter Initial Catalog define inside Connection String? 
The database name to connect to.
What is the difference between System.String and System.StringBuilder classes? 
System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
What is the top .NET class that everything is derived from? 
System.Object.
 
Can you allow class to be inherited, but prevent the method from being over-ridden? 
Yes, just leave the class public and make the method sealed
Can you change the value of a variable while debugging a C# application? 
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
Are private class-level variables inherited? 
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
Can you inherit multiple interfaces? 
Yes. .NET does support multiple interfaces.
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
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 abstract (i.e., as long as you provide a default implementation of the method), any existing derived classes continue to function with no changes. Because interfaces do not support implementation inheritance, this same pattern does not hold for interfaces. Adding a method to an interface is like adding an abstract method to a base class--any class that implements the interface will break, because the class doesn't implement the new interface method. 
Which one is trusted and which one is untrusted? 
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
What namespaces are necessary to create a localized application? 
System.Globalization, System.Resources.
Does Console.WriteLine() stop printing when it reaches a NULL character within a string? 
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.
What is the advantage of using System.Text.StringBuilder over System.String? 
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.
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? 
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 is a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.
Why do I get a security exception when I try to run my C# app? 
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 happening, just move the executable over to your local drive and see if it runs without the exceptions. One of the common exceptions thrown under these conditions is
System.Security.SecurityException.
To get around this, you can change your security policy for the intranet zone, code group 1.2, (the zone that running off shared folders falls into) by using the caspol.exe tool.
Is there any sample C# code for simple threading? 
Some sample code follows: using System;
using System.Threading;
class ThreadTest
{
public void runme()
{
Console.WriteLine("Runme Called");
}
public static void Main(String[] args)
{
ThreadTest b = new ThreadTest();
Thread t = new Thread(new ThreadStart(b.runme));
t.Start();
}
}
What is the difference between // comments, /* */ comments and /// comments? 
Single-line, multi-line and XML documentation comments.
What is the difference between and XML documentation tag? 
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). 

What are three test cases you should go through in unit testing? 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).
How do you inherit from a class in C#? 
Place a colon and then the name of the base class. Notice that it is double colon in C++.
How do I port "synchronized" functions from Visual J++ to C#? 
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() {}
}