Buy Questpond's video subscriptions on
huge discount
.
Online: 2038
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 create a text file and write contents into it.
Posted by
Raja
on 9/8/2008 | Category:
C# Interview questions
| Views: 6367
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Use following code
System.IO.File.WriteAllText(@"c:\MyTextFile.txt", "MyContents");
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
What is the best way to add items from an Array in ...
Next > :
Write a single line of code to read the entire con ...
Comments or Responses
Login to post response
More Interview Questions by Raja
Write a single line of code to read the entire content of the text fil ...
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 ...
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 ...