Visual Studio 2008 New Features

Visual Studio 2008 code name "Orcas" Beta 2 has just hit the road and, since it is Beta 2, this means Visual Studio 2008 is feature complete and is ready for RTM. Below, we would find a brief introduction of some of the new features introduced with VS 2008 and .NET 3.5 Beta 2.

A quick list of some of the new features are:

  • Multi-Targeting support
  • Web Designer and CSS support
  • ASP.NET AJAX and JavaScript support
  • Project Designer
  • Data
  • LINQ � Language Integrated Query

The features listed and explained in this paper are not complete and this document intends to give you a forehand to start off with VS 2008.

1. Multi-Targeting Support

Earlier, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2003 only works with .NET 1.1, and VS 2005 only works with .NET 2.0.

One of the major changes with the VS 2008 release is to support what Microsoft calls "Multi-Targeting". This means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to take advantage of the new features that Visual Studio provides without having to migrate their existing projects and deployed applications to use a new version of the .NET Framework.

Now when we open an existing project or create a new one with VS 2008, we can pick which version of the .NET Framework to work with. The IDE will update its compilers and feature-set to match the chosen .NET Framework.

Features, controls, projects, item-templates, and references that do not work with the selected version of the Framework will be made unavailable or will be hidden.

Unfortunately, support has not been included to work with Framework versions 1.1 and earlier. The present release supports 2.0/3.0 and 3.5 .NET Frameworks.

Microsoft plans to continue multi-targeting support in all future releases of Visual Studio.

Creating a New Project with Visual Studio 2008 that Targets .NET 2.0 Framework Library

The screenshots below depict the creation of a new web application targeting .NET 2.0 Framework. Choose File->New Project. As we see in the snapshot below in the top-right of the new project dialog, there is now a dropdown that allows us to choose which versions of the .NET Framework we want to target when we create the new project. The templates available are filtered depending on the version of the Framework chosen from the dropdown:

Can I Upgrade an Existing Project to .NET 3.5?

When we open a solution created using an older version of Visual Studio and Framework, VS 2008 would ask if migration is required. If we opt to migrate, then a migration wizard would start. If we wish to upgrade our project to target a newer version of the Framework at a later point of time, we can pull up the project properties page and choose the Target Framework. The required assemblies are automatically referenced. The snapshot below shows the properties page with the option Target Framework marked.

2. Web Designer, Editing and CSS Support

One feature that web developers will discover with VS 2008 is its drastically improved HTML designer, and the extensive CSS support made available.

The snapshots below depict some of the new web designer features in-built into VS 2008.

Split View Editing

In addition to the existing views, Design view and Code view, VS 2008 brings along the Split view which allows us to view both the HTML source and the Design View at the same-time, and easily make changes in any of the views. As shown in the image below, as we select a tag in code view, the corresponding elements/controls are selected in design view.

CSS Style Manager

VS 2008 introduces a new tool inside the IDE called "Manage Styles". This shows all of the CSS style sheets for the page.

It can be used when we are in any of the views - design, code and split views. Manage Styles tool can be activated by choosing Format -> CSS Styles -> Manage Styles from the menu. A snapshot of the same would look like the following:

Create a new style using the new style dialog window as show in the snapshot below.

Now, the style manager would show .labelcaption style as well in the CSS styles list. However, if we observe that the body element has a circle around it but the .labelcaption does not have one, this is because the style is not in use yet.

We will not select all the labels below and apply our new style .labelcaption.

We can choose to modify the existing style through GUI using "Modify style..." menu option in the dropdown menu as shown above or choose to hand edit the code by choosing the option "Go To Code".

CSS Source View Intellisense

The designer is equipped with the ability to select an element or control in design-view, and graphically select a rule from the CSS list to apply to it.

We will also find when in source mode that we now have intellisense support for specifying CSS class rules. The CSS Intellisense is supported in both regular ASP.NET pages as well as when working with pages based on master pages.

Code Editing Enhancements

Below is a non-exhaustive list of a few new code editing improvements. There are many more about which I don't know yet.

Transparent Intellisense Mode

While using VS 2005/2003 we often find ourselves escaping out of intellisense in order to better see the code around, and then go back and complete what we were doing.

VS 2008 provides a new feature which allows us to quickly make the intellisense drop-down list semi-transparent. Just hold down the "Ctrl" key while the intellisense drop-down is visible and we will be able to switch it into a transparent mode that enables us to look at the code beneath without having to escape out of Intellisense. The screenshot below depicts the same.

Organize C# Using Statements

One of the small, but a nice new feature in VS 2008 is support for better organizing using statements in C#. We can now select a list of using statements, right-click, and then select the "Organize Usings" sub-menu. When we use this command the IDE will analyze what types are used in the code file, and will automatically remove those namespaces that are declared but not required. A small and handy feature for code refactoring.

3. ASP.NET AJAX and JavaScript Support

JavaScript Intellisense

One new feature that developers will find with VS 2008 is its built-in support for JavaScript Intellisense. This makes using JavaScript and building AJAX applications significantly easier. A double click on HTML control in design mode would automatically create a click event to the button and would create the basic skeleton of the JavaScript function. As we see in the depicted image below, JavaScript Intellisense is inbuilt now. Other JavaScript Intellisense features include Intellisense for external JavaScript libraries and adding Intellisense hints to JavaScript functions.

JavaScript Debugging

One new JavaScript feature in VS 2008 is the much-improved support for JavaScript debugging. This makes debugging AJAX applications significantly easier. JavaScript debugging was made available in VS 2005 itself. However, we had to run the web application first to set the breakpoint or use the "debugger" JavaScript statement.

VS 2008 makes this much better by adding new support that allows us to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files.

We can now set both client-side JavaScript breakpoints and VB/C# server-side breakpoints at the same time on the same page and use a single debugger to step through both the server-side and client-side code in a single debug session. This feature is extremely useful for AJAX applications. The breakpoints are fully supported in external JavaScript libraries as well.

4. Few Other Features and Enhancements

Below is a list of few other enhancements and new features included in Microsoft Visual Studio 2008.

Project Designer

Windows Presentation Foundation (WPF) applications have been added to Visual Studio 2008. There are four WPF project types:

  • WinFX Windows Application
  • WinFX Web Browser Application
  • WinFX Custom Control Library
  • WinFX Service Library

When a WPF project is loaded in the IDE, the user interface of the Project Designer pages lets us specify properties specific to WPF applications.

Data

Microsoft Visual Studio 2008 Beta 2 includes the following new features to incorporate data into applications:

  • The Object Relational Designer (O/R Designer) assists developers in creating and editing the objects (LINQ to SQL entities) that map between an application and a remote database
  • Hierarchical update capabilities in Dataset Designer, providing generated code that includes the save logic required to maintain referential integrity between related tables
  • Local database caching incorporates an SQL Server Compact 3.5 database into an application and configures it to periodically synchronize the data with a remote database on a server. Local database caching enables applications to reduce the number of round trips between the application and a database server

LINQ � Language Integrated Query

LINQ is a new feature in VS 2008 that broadens great querying capabilities into the language syntax. LINQ introduces patterns for querying and updating data. A set of new assemblies are provided that enable the use of LINQ with collections, SQL databases, and XML documents.

Visual Studio 2008 Debugger

The Visual Studio 2008 debugger has been enhanced with the following features:

  • Remote debugging support on Windows Vista
  • Improved support for debugging multithreaded applications
  • Debugging support for LINQ programming
  • Debugging support for Windows Communications Foundation
  • Support for script debugging, including client-side script files generated from server-side script now appear in Solution Explorer

Reporting

Visual Studio 2008 provides several new reporting features and improvements such as:

  • New Report Projects: Visual Studio 2008 includes two new project templates for creating reporting applications. When we create a new Reports Application project, Visual Studio provides a report (.rdlc) and a form with a ReportViewer control bound to the report.
  • Report Wizard: Visual Studio 2008 introduces a Report Wizard, which guides us through the steps to create a basic report. After we complete the wizard, we can enhance the report by using Report Designer.
  • Expression Editor Enhancement: The Expression Editor now provides expressions that we can use directly or customize as required.
  • PDF Compression: The ReportViewer controls can now compress reports that are rendered or exported to the PDF format.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Beautifu Mind

If we make a comparison we would say that the brain is our body and the mind is our spirit. When we think of the brain, we get an image of an ugly biological organ but when we think of its functions, we are at least impressed. This is the human mind, the word which has no physical meaning and describes all that beauty.

While medical research has offered us a thorough picture of the brain anatomy and physiology, we still don't know much about its operations and functions. A large area around the human thought is still unexplored. Despite our unawareness, we are sure that we can discover an unlimited power within our minds. This power is the beauty we refer to.

This website attempts a pleasant trip in discovering and expanding the human mental power. I am going to share with you all my findings through researching my own brain. Later on, you will be able to do the same, writing your own experiences. I am obsessed with this topic and I will do my best to provide you with valuable information.

This site is addressed to people like you and me, who have realized that we have a lot more potential within us and the key to this potential is our brain power.

I want to clarify that all the material here is written by me and is the result of researching the mind from MY OWN perspective. Thus, this information is my personal views on the topics and not the results of an official scientific research. You may not find any medical or scientific advice on this site! The best way for you to experience this site is as a lightweight source of information, like a relaxed discussion with a friend and nothing more.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Interview Questions(c#)


C#

1. What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and its datatype depends on whatever variable we’re changing. 
2. 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++. 
3. Does C# support multiple inheritance? No, use interfaces instead. 
4. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace. 
5. 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. 
6. 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). 
7. 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. 
8. What’s the top .NET class that everything is derived from? System.Object. 
9. How’s 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. 
10. What does the keyword virtual mean in the method definition? The method can be over-ridden. 
11. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override. 
12. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. 
13. Can you prevent your class from being inherited and becoming a base class for some other classes? 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 as final class in Java. 
14. 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. 
15. What’s an abstract class? 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 implementation. 
16. 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. 
17. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes. 
18. Why can’t 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’s public by default. 
19. Can you inherit multiple interfaces? Yes, why not. 
20. And if they have conflicting method names? 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 data, but as far as compiler cares you’re okay. 
21. What’s the difference between an interface and abstract class? 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. 
22. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters. 
23. 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. 
24. What’s 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. 
25. What’s 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’s being operated on, a new instance is created. 
26. Can you store multiple data types in System.Array? No. 
27. What’s 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. 
28. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods. 
29. What’s the .NET datatype that allows the retrieval of data by a unique key? HashTable. 
30. What’s class SortedList underneath? A sorted HashTable. 
31. Will finally block get executed if the exception had not occurred? Yes. 
32. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? 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 {}. 
33. Can multiple catch blocks be executed? 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. 
34. Why is it a bad idea to throw your own exceptions? 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 in the project. 
35. What’s a delegate? A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers. 
36. What’s a multicast delegate? It’s a delegate that points to and eventually fires off several methods. 
37. How’s the DLL Hell problem solved in .NET? 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. 
38. What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command. 
39. What’s 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. 
40. What namespaces are necessary to create a localized application? System.Globalization, System.Resources. 
41. What’s the difference between // comments, /* */ comments and /// comments? Single-line, multi-line and XML documentation comments. 
42. How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with a /doc switch. 
43. What’s the difference between and XML documentation tag? Single line code example and multiple-line code example. 
44. Is XML case-sensitive? Yes, so and are different elements. 
45. What debugging tools come with the .NET SDK? 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. 
46. What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown. 
47. What does assert() do? 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. 
48. What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. 
49. 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. 
50. Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor. 
51. How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger. 
52. 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). 
53. 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. 
54. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources). 
55. 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’s 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. 
56. What’s the role of the DataReader class in ADO.NET connections? It returns a read-only dataset from the data source when the command is executed. 
57. What is the wildcard character in SQL? 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%’. 
58. 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 hasn’t), 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). 
59. What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). 
60. 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. 
61. Why would you use untrusted verificaion? Web Services might use it, as well as non-Windows applications. 
62. What does the parameter Initial Catalog define inside Connection String? The database name to connect to. 
63. What’s the data provider name to connect to Access database? Microsoft.Access. 
64. What does Dispose method do with the connection object? Deletes it from the memory. 
65. What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Interview Questions
C#

1. What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and its datatype depends on whatever variable we’re changing. 
2. 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++. 
3. Does C# support multiple inheritance? No, use interfaces instead. 
4. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace. 
5. 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. 
6. 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). 
7. 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. 
8. What’s the top .NET class that everything is derived from? System.Object. 
9. How’s 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. 
10. What does the keyword virtual mean in the method definition? The method can be over-ridden. 
11. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override. 
12. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. 
13. Can you prevent your class from being inherited and becoming a base class for some other classes? 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 as final class in Java. 
14. 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. 
15. What’s an abstract class? 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 implementation. 
16. 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. 
17. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes. 
18. Why can’t 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’s public by default. 
19. Can you inherit multiple interfaces? Yes, why not. 
20. And if they have conflicting method names? 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 data, but as far as compiler cares you’re okay. 
21. What’s the difference between an interface and abstract class? 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. 
22. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters. 
23. 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. 
24. What’s 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. 
25. What’s 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’s being operated on, a new instance is created. 
26. Can you store multiple data types in System.Array? No. 
27. What’s 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. 
28. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods. 
29. What’s the .NET datatype that allows the retrieval of data by a unique key? HashTable. 
30. What’s class SortedList underneath? A sorted HashTable. 
31. Will finally block get executed if the exception had not occurred? Yes. 
32. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? 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 {}. 
33. Can multiple catch blocks be executed? 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. 
34. Why is it a bad idea to throw your own exceptions? 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 in the project. 
35. What’s a delegate? A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers. 
36. What’s a multicast delegate? It’s a delegate that points to and eventually fires off several methods. 
37. How’s the DLL Hell problem solved in .NET? 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. 
38. What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command. 
39. What’s 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. 
40. What namespaces are necessary to create a localized application? System.Globalization, System.Resources. 
41. What’s the difference between // comments, /* */ comments and /// comments? Single-line, multi-line and XML documentation comments. 
42. How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with a /doc switch. 
43. What’s the difference between and XML documentation tag? Single line code example and multiple-line code example. 
44. Is XML case-sensitive? Yes, so and are different elements. 
45. What debugging tools come with the .NET SDK? 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. 
46. What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown. 
47. What does assert() do? 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. 
48. What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. 
49. 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. 
50. Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor. 
51. How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger. 
52. 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). 
53. 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. 
54. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources). 
55. 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’s 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. 
56. What’s the role of the DataReader class in ADO.NET connections? It returns a read-only dataset from the data source when the command is executed. 
57. What is the wildcard character in SQL? 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%’. 
58. 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 hasn’t), 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). 
59. What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). 
60. 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. 
61. Why would you use untrusted verificaion? Web Services might use it, as well as non-Windows applications. 
62. What does the parameter Initial Catalog define inside Connection String? The database name to connect to. 
63. What’s the data provider name to connect to Access database? Microsoft.Access. 
64. What does Dispose method do with the connection object? Deletes it from the memory. 
65. What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS