Click here to Skip to main content
15,905,233 members
Home / Discussions / C#
   

C#

 
AnswerRe: reading text file as an array by using streamreader Pin
OriginalGriff28-Aug-19 19:56
mveOriginalGriff28-Aug-19 19:56 
AnswerRe: reading text file as an array by using streamreader Pin
Richard MacCutchan28-Aug-19 21:27
mveRichard MacCutchan28-Aug-19 21:27 
QuestionRe: reading text file as an array by using streamreader Pin
Maciej Los28-Aug-19 21:42
mveMaciej Los28-Aug-19 21:42 
AnswerRe: reading text file as an array by using streamreader Pin
Maciej Los28-Aug-19 22:32
mveMaciej Los28-Aug-19 22:32 
AnswerRe: reading text file as an array by using streamreader Pin
BillWoodruff28-Aug-19 23:04
professionalBillWoodruff28-Aug-19 23:04 
AnswerRe: reading text file as an array by using streamreader Pin
Gene M10-Sep-19 14:48
Gene M10-Sep-19 14:48 
AnswerRe: reading text file as an array by using streamreader Pin
Lutosław12-Sep-19 9:35
Lutosław12-Sep-19 9:35 
QuestionTool to add code in my existing class Pin
Bastien Vandamme28-Aug-19 5:48
Bastien Vandamme28-Aug-19 5:48 
AnswerRe: Tool to add code in my existing class Pin
Richard MacCutchan28-Aug-19 5:54
mveRichard MacCutchan28-Aug-19 5:54 
AnswerRe: Tool to add code in my existing class Pin
Richard Deeming28-Aug-19 7:47
mveRichard Deeming28-Aug-19 7:47 
AnswerRe: Tool to add code in my existing class Pin
BillWoodruff28-Aug-19 18:35
professionalBillWoodruff28-Aug-19 18:35 
QuestionValidating textbox value against an excel worksheet and append to datagridview Pin
Member 1457117728-Aug-19 4:51
Member 1457117728-Aug-19 4:51 
AnswerRe: Validating textbox value against an excel worksheet and append to datagridview Pin
ZurdoDev28-Aug-19 5:20
professionalZurdoDev28-Aug-19 5:20 
AnswerRe: Validating textbox value against an excel worksheet and append to datagridview Pin
OriginalGriff28-Aug-19 5:23
mveOriginalGriff28-Aug-19 5:23 
GeneralRe: Validating textbox value against an excel worksheet and append to datagridview Pin
BillWoodruff28-Aug-19 18:49
professionalBillWoodruff28-Aug-19 18:49 
AnswerRe: Validating textbox value against an excel worksheet and append to datagridview Pin
BillWoodruff28-Aug-19 18:46
professionalBillWoodruff28-Aug-19 18:46 
GeneralRe: Validating textbox value against an excel worksheet and append to datagridview Pin
Member 1457117728-Aug-19 21:21
Member 1457117728-Aug-19 21:21 
GeneralRe: Validating textbox value against an excel worksheet and append to datagridview Pin
BillWoodruff28-Aug-19 22:57
professionalBillWoodruff28-Aug-19 22:57 
QuestionRead Portion of text from Text File Pin
Member 1398003226-Aug-19 19:39
Member 1398003226-Aug-19 19:39 
I'm currently doing console application. How do I display S.1.1.004 into the console?

CREATE from S.1.1.001 to S.1.1.002 on Monday, 7th of May, 2019 07:20:44
CREATE from S.1.1.002 to S.1.1.003 on Tuessday, 23rd of March, 2018 10:01:22
CREATE from S.1.1.003 to S.1.1.004 on Wednesday, 4th of February, 2019 5:42:45


using System.Text;
using System.Text.RegularExpressions;
using System.IO;


namespace ReadFromFile
{
    class Program
    {
        static void Main(string[] args)
        {

            TextReader st = new StreamReader("C://test.txt");          
            int NumOfLines = 3;           
            string[] ListLines = new string[NumOfLines];            
            for (int i = 0; i < NumOfLines; i++)
            {
                ListLines[i] = st.ReadLine();
            }      
            Console.WriteLine(ListLines[2]);
            Console.ReadLine();           
            st.Close();
        }

    }
}

AnswerRe: Read Portion of text from Text File Pin
OriginalGriff26-Aug-19 20:27
mveOriginalGriff26-Aug-19 20:27 
GeneralRe: Read Portion of text from Text File Pin
Member 1398003226-Aug-19 20:41
Member 1398003226-Aug-19 20:41 
GeneralRe: Read Portion of text from Text File Pin
phil.o26-Aug-19 21:07
professionalphil.o26-Aug-19 21:07 
GeneralRe: Read Portion of text from Text File Pin
Member 1398003226-Aug-19 21:31
Member 1398003226-Aug-19 21:31 
GeneralRe: Read Portion of text from Text File Pin
phil.o26-Aug-19 21:39
professionalphil.o26-Aug-19 21:39 
GeneralRe: Read Portion of text from Text File Pin
Member 1398003226-Aug-19 21:41
Member 1398003226-Aug-19 21:41 

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.