Is there any difference between String and string ?

There is no special difference between both of them.
Actually System.String is a type which is specified by the Microsoft.Net runtime.
And string is a c# keyword for the same purpose.
Also int in C# ia same as the Integer in VB.NET.Both of them serve as System.Int32 for CLR.

Explain about carriage return ?

Carriage return is used to reset a device’s position to the beginning of a line or text.
It is often called as CR or return.
In .NET, /r escape sequence is used to set this carriage return.

Explain how the content pages can be attached to Master pages ?

There are 3 levels by which the content pages can be attached to Master pages. Each level is explained briefly as follows.

1) At thye Page Level: To bind a content page to a master page, You can use a page directive in each content page.

2) At the application level: You can specify all the ASP.NET pages (.aspx files) in the application to automatically bind to a master page, by making a setting in the pages element of the application’s configuration file (Web.config).

3)At the folder level: In this level, it is like binding at the application level, except that you make the setting in a Web.config file in one folder only. The master-page bindings then apply to the ASP.NET pages in that folder.

Will the finally block gets executed, if an exception occurs ?

Yes, the finally block gets executed, if an exception occurs.
A finally block will be executed irrespective of the exception has occured or not.
Example:

public class EHClass
{
void ReadFile(int index)
{
// To run this code, substitute a valid path from your local machine
string path = @”c:userspublictest.txt”;
System.IO.StreamReader file = new System.IO.StreamReader(path);
char[] buffer = new char[10];

Discuss the advantages of using Dependency Injection..

Below mentioned are some of the advantages of using Dependency Injection.

1) Loosely coupled systems can be developed using Dependency Injection.
2) As long as the component implements the interface type, it is easy to swap in a different implementation of a component.
3) The main advantage of this Dependency Injection is that, it allows the objects to be mocked with in the Unit Tests.

What is a Flat File and what is the use of it?

Flat File:Is the name given to text, which can be read or written only sequentially.
OR
Collection of data stored and which can be accessed sequentially.
Example: Microsoft Excel Sheet .
Used to get the data in sequential manner.

How can a Theme be applied to a web application ?

There are 3 levels at which a theme can be applied for a web application.
They are discussed as below:
1. At the page level – In this level, you have to use the Theme or StyleSheetTheme attribute of the @ Page directive.

2. At the application level – In this level, a theme can be applied to all pages in an application by setting the element in the application configuration file.

3. At the web server level – In this level, you have to define the element in machine.config file. This will apply the theme to all the web applications on that web server.