Click here to Skip to main content
   

C#

 
GeneralRe: C# file PinmvpOriginalGriff23-Jan-13 6:36 
QuestionUse axFrameControl to open the ppt encountered the error [modified] PinmemberJason Fang_22-Jan-13 22:55 
AnswerRe: Use axFrameControl to open the ppt encountered the error Pinmembermicke.andersson28-Jan-13 3:55 
QuestionCreating Various Files Using C# [modified] PinmemberASPnoob22-Jan-13 18:28 
AnswerRe: Creating Various Files Using C# PinmemberPIEBALDconsult22-Jan-13 19:14 
AnswerRe: Creating Various Files Using C# PinmvpAbhinav S22-Jan-13 20:35 
AnswerRe: Creating Various Files Using C# PinmvpRahul Rajat Singh22-Jan-13 20:38 
AnswerRe: Creating Various Files Using C# PinmvpOriginalGriff22-Jan-13 22:33 
You can use a StreamWriter to create any type of file - you are not limited to text:
using (StreamWriter writer = new StreamWriter(@"D:\Temp\MyFile.html"))
{
    writer.Write(textToAdd);
}
Will work fine, and will create a file with the HTML extension. However, that doesn't mean that the file will be readable by a web browser if you double click it - it depends on the content. Similarly, if you use a file name with a .DLL extension, it will be created, but it won;t work if you try to add it as a reference unless you write suitable content into it, or .AVI but it won't show a movie.
 
The extension just controls which application(s) will try to open the file - the content must also be correct and applicable to the application. You can open a .DLL file in VLC Media player provided the content is a video file and not an executable program!
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

QuestionC# update a audit table Pinmemberdcof22-Jan-13 16:56 
AnswerRe: C# update a audit table PinmemberMycroft Holmes22-Jan-13 17:28 
AnswerRe: C# update a audit table PinmemberPIEBALDconsult22-Jan-13 19:25 
GeneralRe: C# update a audit table Pinmemberdcof23-Jan-13 5:41 
GeneralRe: C# update a audit table PinmemberPIEBALDconsult23-Jan-13 6:46 
QuestionTwo others BindingNavigators in one form. How? PinmemberCzajo22-Jan-13 7:26 
AnswerRe: Two others BindingNavigators in one form. How? PinmemberMycroft Holmes22-Jan-13 16:33 
GeneralRe: Two others BindingNavigators in one form. How? PinmemberCzajo22-Jan-13 22:19 
QuestionRunning an exe PinmemberTheGermoz22-Jan-13 6:50 
AnswerRe: Running an exe Pinmembermark merrens22-Jan-13 7:07 
GeneralRe: Running an exe PinmemberTheGermoz22-Jan-13 7:16 
GeneralRe: Running an exe PinprotectorPete O'Hanlon22-Jan-13 7:51 
GeneralRe: Running an exe PinmemberPIEBALDconsult22-Jan-13 8:14 
AnswerRe: Running an exe PinmemberPIEBALDconsult22-Jan-13 7:15 
SuggestionRe: Running an exe PinmvpRichard MacCutchan22-Jan-13 7:34 
GeneralRe: Running an exe PinmemberTheGermoz22-Jan-13 7:57 
GeneralRe: Running an exe Pinmemberjibesh22-Jan-13 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150326.1 | Last Updated 26 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid