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

C#

 
QuestionIs this an OOP Programme? Pin
nstk11-Jun-12 21:26
nstk11-Jun-12 21:26 
AnswerRe: Is this an OOP Programme? Pin
Abhinav S11-Jun-12 23:33
Abhinav S11-Jun-12 23:33 
AnswerRe: Is this an OOP Programme? Pin
Pete O'Hanlon12-Jun-12 1:58
mvePete O'Hanlon12-Jun-12 1:58 
AnswerRe: Is this an OOP Programme? Pin
PIEBALDconsult12-Jun-12 3:40
mvePIEBALDconsult12-Jun-12 3:40 
GeneralMessage Removed Pin
12-Jun-12 4:39
professionalN_tro_P12-Jun-12 4:39 
GeneralRe: Is this an OOP Programme? Pin
nstk12-Jun-12 8:37
nstk12-Jun-12 8:37 
AnswerRe: Is this an OOP Programme? Pin
nstk12-Jun-12 8:34
nstk12-Jun-12 8:34 
GeneralRe: Is this an OOP Programme? Pin
harold aptroot12-Jun-12 8:48
harold aptroot12-Jun-12 8:48 
GeneralRe: Is this an OOP Programme? Pin
jschell12-Jun-12 9:13
jschell12-Jun-12 9:13 
GeneralC# Pin
Mahendra Kumar11-Jun-12 21:05
Mahendra Kumar11-Jun-12 21:05 
AnswerRe: C# Pin
OriginalGriff11-Jun-12 21:24
mveOriginalGriff11-Jun-12 21:24 
GeneralRe: C# Pin
Pete O'Hanlon11-Jun-12 21:34
mvePete O'Hanlon11-Jun-12 21:34 
AnswerRe: C# Pin
Abhinav S11-Jun-12 23:26
Abhinav S11-Jun-12 23:26 
QuestionHow to remove null value from Lambda expression or Array Pin
Member 871482911-Jun-12 9:26
Member 871482911-Jun-12 9:26 
AnswerRe: How to remove null value from Lambda expression or Array Pin
kevinnicol11-Jun-12 10:04
kevinnicol11-Jun-12 10:04 
GeneralRe: How to remove null value from Lambda expression or Array Pin
Member 871482911-Jun-12 10:48
Member 871482911-Jun-12 10:48 
GeneralRe: How to remove null value from Lambda expression or Array Pin
Pete O'Hanlon11-Jun-12 12:05
mvePete O'Hanlon11-Jun-12 12:05 
QuestionC# 2010 edit Pin
sc steinhayse11-Jun-12 6:58
sc steinhayse11-Jun-12 6:58 
AnswerRe: C# 2010 edit Pin
Dave Kreskowiak11-Jun-12 7:12
mveDave Kreskowiak11-Jun-12 7:12 
AnswerRe: C# 2010 edit Pin
OriginalGriff11-Jun-12 8:31
mveOriginalGriff11-Jun-12 8:31 
QuestionDesign surface inside other design surface Pin
redhatee200611-Jun-12 3:42
redhatee200611-Jun-12 3:42 
QuestionAm I doing this right..... Pin
glennPattonWork311-Jun-12 2:41
professionalglennPattonWork311-Jun-12 2:41 
Hi All,
I am writing an application and need to save some data with an incremental number.
My first thought was to use an integer that be could incremented and shoved out disk, now I am trying to do thing properly so I have come up with the following
C#
String Path = Directory.GetCurrentDirectory();
            string[] file_text = Directory.GetFiles(@Path, "*.txt");
            string Name;
            int FileTotal = 0;
                       
            for (int i = 0; i <= file_text.Length - 1; i++)
            {             
               Name = file_text[i].Substring(Path.Length+1);
              // MessageBox.Show(Name);
               FileTotal++;
              // MessageBox.Show(FileTotal.ToString());
            }


            MessageBox.Show(FileTotal.ToString());
            FileTotal++;

            MessageBox.Show("Next File to Written is " + FileTotal.ToString());

It looks for the file (in the bit of example code .txt ...) adds one to the total for the next one. Is this the 'correct' way of doing things or am I creating a kludge that will come back and bite me later.

Glenn
AnswerRe: Am I doing this right..... Pin
PIEBALDconsult11-Jun-12 3:20
mvePIEBALDconsult11-Jun-12 3:20 
GeneralRe: Am I doing this right..... Pin
glennPattonWork311-Jun-12 3:31
professionalglennPattonWork311-Jun-12 3:31 
GeneralRe: Am I doing this right..... Pin
PIEBALDconsult11-Jun-12 4:12
mvePIEBALDconsult11-Jun-12 4:12 

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.