Buy Questpond's video subscriptions on
huge discount
.
Online: 2470
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
C#
>
Loading ...
Write a single line of code to read the entire content of the text file.
Posted by
Raja
on 9/8/2008 | Category:
C# Interview questions
| Views: 6130
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
User following code
string strContent = System.IO.File.ReadAllText(Server.MapPath("~/MyTextFile.txt"));
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
Write a single line of code to create a text file ...
Next > :
How to read entire stream contents?
Comments or Responses
Login to post response
More Interview Questions by Raja
How to read entire stream contents?
How to change Database name in SQL Server?
How to sort an array into descending order?
How to convert a sentence into Title Case (Capitalize first character ...
How to convert an ArrayList into an Array?
How to convert an Array into an ArrayList?
How to get the authentication mode from web.config file programmatical ...
How to clear the last error occured in the application?
Latest Interview Questions
Difference between DropDownList.Items.Add and DropDownList.Items.Inser ...
Difference between classes and structures?
What is the purpose of connection pooling in ADO.NET?
What’s the difference between // comments, /* */ comments and /// comm ...
what is the diff between a HAVING CLAUSE and a WHERE CLAUSE?
How many types of cookies are there in ASP.NET ?
Types of Errors ?
What event handlers can I include in Global.asax?
More ...