Click here to Skip to main content
15,896,730 members
Home / Discussions / C#
   

C#

 
GeneralRe: increase the font size of the text and size of the controls, when click on maximize button Pin
NarVish28-Jul-10 2:23
NarVish28-Jul-10 2:23 
GeneralRe: increase the font size of the text and size of the controls, when click on maximize button Pin
Nuri Ismail28-Jul-10 3:10
Nuri Ismail28-Jul-10 3:10 
QuestionGenerate Text File Pin
tek 200927-Jul-10 22:41
tek 200927-Jul-10 22:41 
AnswerRe: Generate Text File Pin
OriginalGriff27-Jul-10 22:52
mveOriginalGriff27-Jul-10 22:52 
GeneralRe: Generate Text File Pin
tek 200927-Jul-10 23:16
tek 200927-Jul-10 23:16 
GeneralRe: Generate Text File Pin
Pete O'Hanlon27-Jul-10 23:22
mvePete O'Hanlon27-Jul-10 23:22 
AnswerRe: Generate Text File Pin
tek 200927-Jul-10 23:36
tek 200927-Jul-10 23:36 
GeneralRe: Generate Text File Pin
OriginalGriff27-Jul-10 23:28
mveOriginalGriff27-Jul-10 23:28 
tek 2009 wrote:
want to write the data into a text file as a table


Well, a text file doesn't hold tables, it only holds flat data, so you will have to decide how to store it so that you can retrieve it later. To save it as flat text is simple:
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("Hello", "There");
dict.Add("Hello again", "There you");
dict.Add("Hello again again", "There you are");
using (TextWriter tw = File.CreateText(@"C:\\temp.txt"))
    {
    foreach (KeyValuePair<string, string> kvp in dict)
        {
        tw.WriteLine(kvp.Key + ":" + kvp.Value);
        }
    tw.Close();
    }
Anything more complex will need you to think about data storage in a bit more detail!
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

AnswerRe: Generate Text File Pin
tek 200928-Jul-10 0:15
tek 200928-Jul-10 0:15 
GeneralRe: Generate Text File Pin
OriginalGriff28-Jul-10 0:20
mveOriginalGriff28-Jul-10 0:20 
AnswerRe: Generate Text File Pin
Peace ON27-Jul-10 22:53
Peace ON27-Jul-10 22:53 
QuestionWhy cant I access my forms design Pin
TSWatson27-Jul-10 22:27
TSWatson27-Jul-10 22:27 
AnswerRe: Why cant I access my forms design Pin
Khaniya28-Jul-10 0:30
professionalKhaniya28-Jul-10 0:30 
Questionhow to convert google guage chart in pdf format.. Pin
Nagendra Pal27-Jul-10 21:34
Nagendra Pal27-Jul-10 21:34 
AnswerRe: how to convert google guage chart in pdf format.. Pin
Nagy Vilmos27-Jul-10 22:17
professionalNagy Vilmos27-Jul-10 22:17 
GeneralRe: how to convert google guage chart in pdf format.. Pin
OriginalGriff27-Jul-10 22:55
mveOriginalGriff27-Jul-10 22:55 
QuestionProblem with pc to pc Voice chat on LAN using h323 protocol. Pin
88Rocker27-Jul-10 18:46
88Rocker27-Jul-10 18:46 
AnswerRe: Problem with pc to pc Voice chat on LAN using h323 protocol. Pin
OriginalGriff27-Jul-10 21:12
mveOriginalGriff27-Jul-10 21:12 
AnswerRe: Problem with pc to pc Voice chat on LAN using h323 protocol. Pin
88Rocker28-Jul-10 5:52
88Rocker28-Jul-10 5:52 
QuestionIs there a backgroungworker in WPF Pin
JimmyRopes27-Jul-10 15:59
professionalJimmyRopes27-Jul-10 15:59 
AnswerRe: Is there a backgroungworker in WPF Pin
N a v a n e e t h27-Jul-10 17:43
N a v a n e e t h27-Jul-10 17:43 
GeneralRe: Is there a backgroungworker in WPF Pin
JimmyRopes28-Jul-10 11:48
professionalJimmyRopes28-Jul-10 11:48 
AnswerRe: Is there a backgroungworker in WPF Pin
Pete O'Hanlon27-Jul-10 21:41
mvePete O'Hanlon27-Jul-10 21:41 
GeneralRe: Is there a backgroungworker in WPF Pin
riced28-Jul-10 0:17
riced28-Jul-10 0:17 
GeneralRe: Is there a backgroungworker in WPF Pin
N a v a n e e t h28-Jul-10 1:27
N a v a n e e t h28-Jul-10 1:27 

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.