Click here to Skip to main content
15,891,762 members
Home / Discussions / C#
   

C#

 
GeneralRe: errors Pin
Richard MacCutchan4-Nov-13 22:41
mveRichard MacCutchan4-Nov-13 22:41 
QuestionEnglish to Arabic text for printing in Arabic Pin
Aswartha Vamsi4-Nov-13 5:35
Aswartha Vamsi4-Nov-13 5:35 
AnswerRe: English to Arabic text for printing in Arabic Pin
Richard MacCutchan4-Nov-13 6:12
mveRichard MacCutchan4-Nov-13 6:12 
AnswerRe: English to Arabic text for printing in Arabic Pin
Ravi Bhavnani4-Nov-13 6:51
professionalRavi Bhavnani4-Nov-13 6:51 
QuestionList problem ! Pin
_Q12_3-Nov-13 15:18
_Q12_3-Nov-13 15:18 
AnswerRe: List problem ! Pin
Abhinav S3-Nov-13 19:13
Abhinav S3-Nov-13 19:13 
GeneralRe: List problem ! Pin
_Q12_3-Nov-13 19:47
_Q12_3-Nov-13 19:47 
AnswerRe: List problem ! Pin
OriginalGriff3-Nov-13 22:04
mveOriginalGriff3-Nov-13 22:04 
Being frank here: that code is rather poor.
I'm not too surprised that if you change something, the rest of it starts to fall over - you don't seem to have any consistent structure or to use any good practices.
Don't call things "list1" and "list2" - name them after what they do, just as you do in the comments.
If you only want files which match an extension, then only retrieve file which match the extension:
C#
string[] files = Directory.GetFiles(path, "*.PLS");
If you want all lines from a file, then just read them:
C#
string[] lines = File.ReadAllLines(path);
You can then convert this to a list with the ToList method if you need a list.
And so on - try modularising this code so that you have a method doing one task, then call it from your click handler - that way, you can test the method in isolation and be sure it works.

I'm not at all sure what your code is doing at the moment, so I'm not that surprised that you have problems maintaining it - it looks like you have hacked and slashed it a bit to get it working, then hacked it again to fix that bug, then...all without sitting down and working out what you are trying to achieve and doing a design of some form which meets that aim first.
The only instant messaging I do involves my middle finger.

English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.

AnswerRe: List problem ! Pin
Richard MacCutchan3-Nov-13 22:10
mveRichard MacCutchan3-Nov-13 22:10 
AnswerRe: List problem ! Pin
Paulo Augusto Kunzel4-Nov-13 3:02
professionalPaulo Augusto Kunzel4-Nov-13 3:02 
AnswerRe: List problem ! Pin
Pete O'Hanlon4-Nov-13 3:24
mvePete O'Hanlon4-Nov-13 3:24 
Questionalways black screen Pin
josephdalebert2-Nov-13 23:33
josephdalebert2-Nov-13 23:33 
AnswerRe: always black screen Pin
Richard Andrew x643-Nov-13 13:20
professionalRichard Andrew x643-Nov-13 13:20 
QuestionC# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 8:05
professionalBillWoodruff2-Nov-13 8:05 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
harold aptroot2-Nov-13 8:23
harold aptroot2-Nov-13 8:23 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 18:43
professionalBillWoodruff2-Nov-13 18:43 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
TnTinMn2-Nov-13 17:28
TnTinMn2-Nov-13 17:28 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 18:48
professionalBillWoodruff2-Nov-13 18:48 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
TnTinMn3-Nov-13 10:50
TnTinMn3-Nov-13 10:50 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
jschell4-Nov-13 8:05
jschell4-Nov-13 8:05 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
Keith Barrow5-Nov-13 2:22
professionalKeith Barrow5-Nov-13 2:22 
QuestionBurning open file to CD/DVD Pin
Member 103095672-Nov-13 1:34
Member 103095672-Nov-13 1:34 
AnswerRe: Burning open file to CD/DVD Pin
Dave Kreskowiak2-Nov-13 9:20
mveDave Kreskowiak2-Nov-13 9:20 
GeneralRe: Burning open file to CD/DVD Pin
Member 103095672-Nov-13 9:45
Member 103095672-Nov-13 9:45 
AnswerRe: Burning open file to CD/DVD Pin
TnTinMn3-Nov-13 11:58
TnTinMn3-Nov-13 11:58 

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.