Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Eddy Vluggen5-Aug-18 5:54
professionalEddy Vluggen5-Aug-18 5:54 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
OriginalGriff5-Aug-18 6:07
mveOriginalGriff5-Aug-18 6:07 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Eddy Vluggen5-Aug-18 10:49
professionalEddy Vluggen5-Aug-18 10:49 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Member 138463766-Aug-18 9:18
Member 138463766-Aug-18 9:18 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
OriginalGriff6-Aug-18 21:50
mveOriginalGriff6-Aug-18 21:50 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Member 138463767-Aug-18 3:23
Member 138463767-Aug-18 3:23 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Richard Deeming7-Aug-18 3:55
mveRichard Deeming7-Aug-18 3:55 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
OriginalGriff7-Aug-18 4:10
mveOriginalGriff7-Aug-18 4:10 
The property is self contained - it can't access local variables (i.e. variables which are declared within the scope of a method) because they only exist for the lifetime of the method - when the method returns, the variable is genuinely destroyed and no longer exists to be accessed!

Your property can only access variables which are scoped to the class, so they are either static (in which case there is only one for all instances of the class) or they are declared public, private, protected, internal, or protected internal - none of which can be applied to local variables.

Local variables are held on something called the stack, which is part of the thread that does the actual execution, not as part of the class instance.
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

SuggestionRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Richard Deeming7-Aug-18 4:57
mveRichard Deeming7-Aug-18 4:57 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Member 1384637619-Aug-18 3:28
Member 1384637619-Aug-18 3:28 
GeneralRe: SelectedIndex doesn't work with the SelectionChanged event handler but it works with the ButtonClick event handler. Pin
Richard Deeming20-Aug-18 7:52
mveRichard Deeming20-Aug-18 7:52 
QuestionWant to change the Validation attribute at runtime ASP.Net MVC Pin
indian1433-Aug-18 7:57
indian1433-Aug-18 7:57 
AnswerRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Gerry Schmitz3-Aug-18 9:18
mveGerry Schmitz3-Aug-18 9:18 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1433-Aug-18 10:17
indian1433-Aug-18 10:17 
AnswerRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming3-Aug-18 10:21
mveRichard Deeming3-Aug-18 10:21 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1433-Aug-18 11:16
indian1433-Aug-18 11:16 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming3-Aug-18 12:14
mveRichard Deeming3-Aug-18 12:14 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1433-Aug-18 12:48
indian1433-Aug-18 12:48 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming6-Aug-18 2:05
mveRichard Deeming6-Aug-18 2:05 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1436-Aug-18 6:39
indian1436-Aug-18 6:39 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming6-Aug-18 7:15
mveRichard Deeming6-Aug-18 7:15 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1436-Aug-18 7:32
indian1436-Aug-18 7:32 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming6-Aug-18 9:16
mveRichard Deeming6-Aug-18 9:16 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
indian1436-Aug-18 10:12
indian1436-Aug-18 10:12 
GeneralRe: Want to change the Validation attribute at runtime ASP.Net MVC Pin
Richard Deeming7-Aug-18 1:56
mveRichard Deeming7-Aug-18 1:56 

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.