Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sender vs From Pin
Scott Dorman28-Aug-07 5:15
professionalScott Dorman28-Aug-07 5:15 
GeneralRe: Sender vs From Pin
logicaldna28-Aug-07 4:56
logicaldna28-Aug-07 4:56 
GeneralRe: Sender vs From Pin
Scott Dorman28-Aug-07 5:23
professionalScott Dorman28-Aug-07 5:23 
GeneralRe: Sender vs From Pin
logicaldna28-Aug-07 5:31
logicaldna28-Aug-07 5:31 
QuestionRead a 3 Column CSV data in to a Datatable [modified] Pin
kibromg28-Aug-07 1:27
kibromg28-Aug-07 1:27 
AnswerRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One28-Aug-07 3:01
Spacix One28-Aug-07 3:01 
GeneralRe: Read a 3 Column CSV data in to a Datatable Pin
kibromg28-Aug-07 3:43
kibromg28-Aug-07 3:43 
AnswerRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One28-Aug-07 8:57
Spacix One28-Aug-07 8:57 
Something like this should get you stated if you fix the two or three errors in it
namespace cvsreadapp
{
    class CVSreader
    {
        public static bool ReadFile(string sFileName, out string[][] saJaggedArray)
        {
            bool bReturnValue = false;
            try
            {
                string[] sFile;
                int i=0;
                StreamReader srFileIO = null;
                FileStream fsFileIO = null;
                // open output file
                fsFileIO = new FileStream(sFileName, FileMode.Open, FileAccess.Read);
                srFileIO = new StreamReader(fsFileIO);
                // read file
                sFile = srFileIO.ReadToEnd().Split('\n');
                saJaggedArray = new string[sFile.Length][];
                foreach (string x in sFile)
                {
                    saJaggedArray[i] = new string[3];
                    saJaggedArray[i] = x.Split(',');
                }
                srFileIO.Close();
                fsFileIO.Close();
                bReturnValue = true;
            }
            catch
            {
                bReturnValue = false;
            }
            return bReturnValue;
        }
    }
    class MyApp
    {
        static void main(string[] args)
        {
            string[][] jaggedarray;
            if (!CVSreader.ReadFile("mycvsfile.cvs", out jaggedarray))
            {
                Console.WriteLine("Error reading CVS file");
            }
            foreach (string[] i in jaggedarray)
            {
                foreach (string j in i)
                {
                    Console.Write(string.Concat(i," "));
                }
                Console.Write('\n');
            }
        }
    }
}

GeneralRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One29-Aug-07 5:20
Spacix One29-Aug-07 5:20 
QuestionWinForms designer bug? Pin
Lutosław28-Aug-07 0:50
Lutosław28-Aug-07 0:50 
QuestionLoading Data into SQL Tables using C# Pin
jtstanishfwg28-Aug-07 0:20
jtstanishfwg28-Aug-07 0:20 
QuestionModify The Database Name in app.config at run time Pin
BhuMan28-Aug-07 0:08
BhuMan28-Aug-07 0:08 
AnswerRe: Modify The Database Name in app.config at run time Pin
Vasudevan Deepak Kumar28-Aug-07 1:20
Vasudevan Deepak Kumar28-Aug-07 1:20 
GeneralRe: Modify The Database Name in app.config at run time Pin
Big Daddy Farang28-Aug-07 4:41
Big Daddy Farang28-Aug-07 4:41 
AnswerRe: Modify The Database Name in app.config at run time Pin
Vikram A Punathambekar28-Aug-07 2:18
Vikram A Punathambekar28-Aug-07 2:18 
QuestionFocus Pin
Assaf8227-Aug-07 23:54
Assaf8227-Aug-07 23:54 
AnswerRe: Focus Pin
Lutosław28-Aug-07 0:42
Lutosław28-Aug-07 0:42 
Questionc# Pin
lankaudaranga27-Aug-07 23:37
lankaudaranga27-Aug-07 23:37 
AnswerRe: c# Pin
Colin Angus Mackay27-Aug-07 23:42
Colin Angus Mackay27-Aug-07 23:42 
AnswerRe: c# Pin
Baconbutty27-Aug-07 23:48
Baconbutty27-Aug-07 23:48 
AnswerWill you ever go away? Pin
leckey28-Aug-07 4:03
leckey28-Aug-07 4:03 
Questionc# Pin
lankaudaranga27-Aug-07 23:36
lankaudaranga27-Aug-07 23:36 
AnswerRe: c# Pin
Colin Angus Mackay27-Aug-07 23:41
Colin Angus Mackay27-Aug-07 23:41 
GeneralRe: c# Pin
Martin#27-Aug-07 23:52
Martin#27-Aug-07 23:52 
GeneralRe: c# Pin
Vikram A Punathambekar28-Aug-07 2:22
Vikram A Punathambekar28-Aug-07 2:22 

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.