Reversing a string in c# is a three step process.
Step 1 :- First convert the string to a char array.
string str = ” .NET interview questions with answers “;
char[] Array1 = str.ToArray(); // Step 1 :- Convert to a Array
Step 2 :- Call the reverse method of the array.
Array.Reverse(Array1); // Step 2 :- call the reverse method
Step 3 :- Convert the reversed array back to string
string strrev = new string(Array1); // Step 3:- Convert the same back to a string
Below goes the complete code for the same.
string str = “c# interview questions with answers”;
char[] Array1 = str.ToArray(); // Step 1 :- Convert to a Array
Array.Reverse(Array1); // Step 2 :- call the reverse method
string strrev = new string(Array1); // Step 3:- Convert the same back to a string
Console.WriteLine(strrev);
This is a nice blog which has a nice collection of real time c# interview questions and answers.
We are also thankful to Mr Shivprasad Koirala and Bpb publication to print such a awesome book c# interview questions and answers
Ajax stands for Asynchronous JavaScript and XML. There are two prime benefits of Ajax:-
The above question is taken from the bestselling c# and .NET interview question book written by Shivprasadkoirala and published by BPB publication.
References
Below are 15 real time design pattern and .NET interview question asked in IT companies.
1. You want to implement Audit trail which design patterns suits?
2. You want to implement a simple and customizable work flow which design patterns suits?
3. You have multiple data access methods i.e. SQL Server, Oracle which design patterns suits?
4. You have a WPF application which architecture pattern suits better?
5. You want to create your own language compiler which design pattern is better?
6. What are the ways by which you can implement dependency injection?
7. You have a third party DLL and some methods of that DLL are not compatible with current code in terms of naming convention which design pattern is better?
8. WCF and Web service implement which pattern internally?
9. ASP.NET page life cycle implement which design pattern internally?
10.“For each” syntax reminds you of which pattern?
11. You have huge screen and you want to implement cancel functionality, without database trip.
12. Which is the best pattern to implement UNDO and REDO?
13. You have 5 heavy duty classes which talks with each other; your code has become clumsy which pattern is suitable?
14. How can we improve the below code in terms of consistency which pattern can help us for the same?

15. You have master tables and you want to cache them on Demand which design pattern is suited?
Design pattern interview question References for further reading:-
• If you want to Learn MVC ( Model view controller) step by step start from here
• You can refer this comprehensive.NET interview question book published by BPB publications.
If you are new to CTE please see (What is CTE ) SQL Server interview question first.
CTE can be used only once in the same execution. You can see the below code snippet where we have created a simple CTE called as “MyTemp”. In the same execution I have tried to use it 2 times and you can see how did not identify the “MyTemp” in the second select execution.

declare @Combine varchar(200)
set @Combine=”
SELECT @Combine = @Combine + [Column1] FROM [Customer].[dbo].[SomeTable]
print @Combine
You can also see SQL server interview question video :-
“ActionFilters” helps you to perform logic before a MVC action happens or after a MVC action is completed. Action filters are useful in the following scenarios:-
1. Implement pre-processing / post processing logic before or after the action happens.
2. Cancel a current execution.
3. Inspect the returned value.
4. Provide extra data to the action.
Also read ASP.NET interview question :- What is difference between “Server.Transfer” and “Response.Redirect”?
Do visit for more c# and MVC interview questions and answer at www.questpond.com
The above question is taken from the book published by Bpb publication .NET interview question by Shivprasad koirala.
This is a nice c# /.NET interview question which was asked to a senior consultant in capgemini Mumbai recently. So below is simple answer for the same.
Hashing is a process of converting string of characters into a shorter fixed-length value or key which represents the original string. It has many uses like encryption (MD5 , SHA1 etc) or creating a key by which the original values can be retrieved easily ( Hash tables collections in .NET).
The above question was borrowed from book .NET interview questions and answers by koirala .
We had received this email from one our blog readers, who had gone for the c# /.NETinterview in Accenture.
“Adapter” class connect the dataset and data source. Below is simple ADO.NET code where you can see how the “da” which is the data adapter is filling the dataset i.e. “CustomersDataSet” using the “Fill” method.
DataSet CustomersDataSet = new Dataset();
da = new SqlDataAdapter(“select * from CustTest order by Custld”, cn);
da.Fill(CustomersDataSet, “Customers”);
Just a quick note the above answer is taken from the book .NET interview question by Shivprasad koirala.
Start learning MVC step by step from here Learn MVC step by step
You can use windows or forms authentication for MVC.
For windows authentication you need to go and modify the “web.config” file and set authentication mode to windows.
Then in the controller or on the action you can use the “Authorize” attribute which specifies which users have access to these controllers and actions. Below is the code snippet for the same. Now only the users specified in the controller and action can access the same.

Forms authentication is implemented the same way as we do in ASP.NET. So the first step is to set authentication mode equal to forms. The “loginUrl” points to a controller here rather than page


We also need to create a controller where we will check the user is proper or not. If the user is proper we will set the cookie value 
All the other actions need to be attributed with “Authorize” attribute so that any unauthorized user if he makes a call to these controllers it will redirect to the controller ( in this case the controller is “Login”) which will do authentication.

Below is an important c# interview question and answers video:- Can you explain extension methods?
See more stuffs on c# and ASP.NET MVC interview question and answers
Regards,
Click here to view more c#/ASP.NET MVC interview question and answers
This article will explain how to restrict MVC actions to be invoked only by GET or POST.For more articles visit us at www.questpond.com
This article explain you how to do validation in MVC (Model view controller).For more articles visit us at www.questpond.com
SQL Server Interview Question and answers:- Are SQL Server views updatable? -
In this article we will see does SQL Server views updatable.For more articles and Videos Visit us at http://www.questpond.com
[video]
C# interview questions: - Top c# interview questions asked in c# and .NET interviews -
This are the top C# interview questions.For more visit us on http://www.questpond.com
In case you are new to MVC start learning by click on this video learn MVC step by step.
MVC is an evolution of a 3 layered traditional architecture. Many components of 3 layered architecture are part of MVC. So below is how the mapping goes.


Below is an important c# interview question video
See more stuffs on ASP.NET interview questions
Regards,
Click here to view more C#/ASP.NET interview questions and answers