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

C#

 
QuestionC# Read from text file Pin
Pavlex423-Dec-16 21:16
Pavlex423-Dec-16 21:16 
AnswerRe: C# Read from text file Pin
Michael_Davies23-Dec-16 21:29
Michael_Davies23-Dec-16 21:29 
AnswerRe: C# Read from text file Pin
OriginalGriff23-Dec-16 21:34
mveOriginalGriff23-Dec-16 21:34 
GeneralRe: C# Read from text file Pin
Pavlex423-Dec-16 21:40
Pavlex423-Dec-16 21:40 
AnswerRe: C# Read from text file Pin
Midi_Mick23-Dec-16 21:41
professionalMidi_Mick23-Dec-16 21:41 
GeneralRe: C# Read from text file Pin
Pavlex423-Dec-16 21:53
Pavlex423-Dec-16 21:53 
GeneralRe: C# Read from text file Pin
Midi_Mick23-Dec-16 22:09
professionalMidi_Mick23-Dec-16 22:09 
GeneralRe: C# Read from text file Pin
OriginalGriff23-Dec-16 22:56
mveOriginalGriff23-Dec-16 22:56 
GeneralRe: C# Read from text file Pin
Dave Kreskowiak24-Dec-16 4:38
mveDave Kreskowiak24-Dec-16 4:38 
AnswerRe: C# Read from text file Pin
Gerry Schmitz26-Dec-16 5:42
mveGerry Schmitz26-Dec-16 5:42 
QuestionC# Specified cast is not valid Pin
Pavlex422-Dec-16 20:48
Pavlex422-Dec-16 20:48 
AnswerRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 21:23
mveRichard MacCutchan22-Dec-16 21:23 
GeneralRe: C# Specified cast is not valid Pin
Pavlex422-Dec-16 21:33
Pavlex422-Dec-16 21:33 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:09
mveRichard MacCutchan22-Dec-16 22:09 
GeneralRe: C# Specified cast is not valid Pin
harold aptroot22-Dec-16 22:26
harold aptroot22-Dec-16 22:26 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:33
mveRichard MacCutchan22-Dec-16 22:33 
GeneralRe: C# Specified cast is not valid Pin
harold aptroot22-Dec-16 22:39
harold aptroot22-Dec-16 22:39 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:54
mveRichard MacCutchan22-Dec-16 22:54 
GeneralRe: C# Specified cast is not valid Pin
OriginalGriff22-Dec-16 22:12
mveOriginalGriff22-Dec-16 22:12 
AnswerRe: C# Specified cast is not valid Pin
OriginalGriff22-Dec-16 22:11
mveOriginalGriff22-Dec-16 22:11 
Please, start looking at your code, using the debugger, and thinking: your questions are showing increasing evidence that you are not doing any of these things.
If the error is in this line:
C#
this.pokusaj[0] = (int)button.Tag;

Then it obvious that whatever is stored in the Tag property of the button control is not an integer.
What is it? We can't tell.
Why isn't it an integer? Again, we can't tell - because we can't run your code and see what is going on.
So for the unpteenth time: USE THE DEBUGGER and look at what is happening. It's the only way you are going to find out.

Personally? I'd guess the Tag is null - which can't be cast to any value type.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

AnswerRe: C# Specified cast is not valid Pin
Nelson Costa Inácio22-Dec-16 22:42
Nelson Costa Inácio22-Dec-16 22:42 
GeneralRe: C# Specified cast is not valid Pin
harold aptroot22-Dec-16 22:45
harold aptroot22-Dec-16 22:45 
GeneralRe: C# Specified cast is not valid Pin
OriginalGriff23-Dec-16 0:05
mveOriginalGriff23-Dec-16 0:05 
AnswerRe: C# Specified cast is not valid Pin
Pete O'Hanlon23-Dec-16 0:00
mvePete O'Hanlon23-Dec-16 0:00 
AnswerRe: C# Specified cast is not valid Pin
Gerry Schmitz23-Dec-16 6:50
mveGerry Schmitz23-Dec-16 6:50 

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.