Click here to Skip to main content
16,013,592 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Labels [modified] Pin
djnevs17-Jun-08 6:55
djnevs17-Jun-08 6:55 
QuestionList of sql server 2005 machines Pin
arkiboys17-Jun-08 5:32
arkiboys17-Jun-08 5:32 
AnswerRe: List of sql server 2005 machines Pin
DavidByram17-Jun-08 5:48
DavidByram17-Jun-08 5:48 
AnswerRe: List of sql server 2005 machines Pin
Parwej Ahamad17-Jun-08 5:50
professionalParwej Ahamad17-Jun-08 5:50 
QuestionConvert generic data to bytes Pin
j.newger17-Jun-08 4:56
j.newger17-Jun-08 4:56 
AnswerRe: Convert generic data to bytes Pin
Anthony Mushrow17-Jun-08 5:01
professionalAnthony Mushrow17-Jun-08 5:01 
GeneralRe: Convert generic data to bytes Pin
j.newger17-Jun-08 5:09
j.newger17-Jun-08 5:09 
AnswerRe: Convert generic data to bytes Pin
Le centriste17-Jun-08 5:07
Le centriste17-Jun-08 5:07 
It would be nice to see the compiler error, although I suspect it complains about having no overloaded version of write that takes your type.

Try to use a StreamWriter. Like in the following:

public void save(T[] data)
{
    StreamWriter sw = new StreamWriter(ms_);
    for (int i = 0; i < data.Length; ++i) sw.Write(data[i]);
}


Even better, since there is no guarantee that T is one of the types for which StreamWriter.Write has an overload, you could do this instead:

public void save(T[] data)
{
    StreamWriter sw = new StreamWriter(ms_);

    for (int i = 0; i &lt; data.Length; ++i) sw.Write(data[i].ToString());
}

QuestionRemote DataBase Access Pin
ahmedsamir17-Jun-08 4:34
ahmedsamir17-Jun-08 4:34 
AnswerRe: Remote DataBase Access Pin
Parwej Ahamad17-Jun-08 4:41
professionalParwej Ahamad17-Jun-08 4:41 
GeneralRe: Remote DataBase Access Pin
ahmedsamir19-Jun-08 0:29
ahmedsamir19-Jun-08 0:29 
Questiontrying out UDP socket, and failing.... (on Vista) [modified] Pin
Super Lloyd17-Jun-08 4:33
Super Lloyd17-Jun-08 4:33 
AnswerRe: trying out UDP socket, and failing.... (on Vista) Pin
Parwej Ahamad17-Jun-08 4:42
professionalParwej Ahamad17-Jun-08 4:42 
GeneralRe: trying out UDP socket, and failing.... (on Vista) Pin
Super Lloyd17-Jun-08 4:57
Super Lloyd17-Jun-08 4:57 
AnswerRe: trying out UDP socket, and failing.... (on Vista) Pin
Super Lloyd17-Jun-08 4:54
Super Lloyd17-Jun-08 4:54 
QuestionEntity Framework Pin
Brendan Vogt17-Jun-08 4:26
Brendan Vogt17-Jun-08 4:26 
AnswerRe: Entity Framework Pin
Judah Gabriel Himango17-Jun-08 5:16
sponsorJudah Gabriel Himango17-Jun-08 5:16 
GeneralRe: Entity Framework Pin
Brendan Vogt18-Jun-08 3:55
Brendan Vogt18-Jun-08 3:55 
GeneralRe: Entity Framework Pin
Judah Gabriel Himango18-Jun-08 5:43
sponsorJudah Gabriel Himango18-Jun-08 5:43 
QuestionRe: Entity Framework Pin
Brendan Vogt23-Jun-08 3:42
Brendan Vogt23-Jun-08 3:42 
QuestionRetrieving Conrtols custom attribute?? Pin
zachbob17-Jun-08 4:07
zachbob17-Jun-08 4:07 
AnswerRe: Retrieving Conrtols custom attribute?? [modified] Pin
Henrik K. Larsen19-Jun-08 20:37
Henrik K. Larsen19-Jun-08 20:37 
Question[Message Deleted] Pin
imran_rafique17-Jun-08 3:41
imran_rafique17-Jun-08 3:41 
AnswerRe: WebBrowser Control objects Session issue? Pin
Christian Graus17-Jun-08 3:46
protectorChristian Graus17-Jun-08 3:46 
GeneralRe: WebBrowser Control objects Session issue? Pin
imran_rafique17-Jun-08 4:10
imran_rafique17-Jun-08 4:10 

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

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