Click here to Skip to main content
15,908,842 members
Home / Discussions / C#
   

C#

 
AnswerRe: Switch Pin
Vega0227-Dec-06 7:00
Vega0227-Dec-06 7:00 
This question has already been answered, but I just wanted to add that you can use more curly braces to further delimit the scope of variables. For example:

protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
switch (e.CommandName)
{
case "1":
{
HiddenField n = (HiddenField)e.Item.FindControl("IDProizvoda");
...
break;
}
case "2":
{
Hiddenfield n = (HiddenField)e.Item.FindControl("IDProizvoda");
...
break;
}
}
}

In your example it probably doesn't matter, but this certainly comes in handy when case blocks become larger and you want to keep your code partitioned. Smile | :)
GeneralRe: Switch Pin
Shevchenko727-Dec-06 7:21
Shevchenko727-Dec-06 7:21 
QuestionHow to create a file Pin
CodeItWell26-Dec-06 6:29
CodeItWell26-Dec-06 6:29 
AnswerRe: How to create a file Pin
Luc Pattyn26-Dec-06 6:53
sitebuilderLuc Pattyn26-Dec-06 6:53 
QuestionIP resolution working in a subnet... Pin
patonios26-Dec-06 6:07
patonios26-Dec-06 6:07 
AnswerRe: IP resolution working in a subnet... Pin
Tarakeshwar Reddy26-Dec-06 19:36
professionalTarakeshwar Reddy26-Dec-06 19:36 
AnswerRe: IP resolution working in a subnet... Pin
patonios27-Dec-06 1:29
patonios27-Dec-06 1:29 
QuestionfolderBrowserDialog and openFileDialog Pin
CodeItWell26-Dec-06 5:52
CodeItWell26-Dec-06 5:52 
AnswerRe: folderBrowserDialog and openFileDialog Pin
Stefan Troschuetz26-Dec-06 7:32
Stefan Troschuetz26-Dec-06 7:32 
AnswerRe: folderBrowserDialog and openFileDialog Pin
Nader Elshehabi26-Dec-06 7:33
Nader Elshehabi26-Dec-06 7:33 
QuestionSound Async?? Pin
Muammar©26-Dec-06 5:28
Muammar©26-Dec-06 5:28 
AnswerRe: Sound Async?? Pin
Luc Pattyn26-Dec-06 6:58
sitebuilderLuc Pattyn26-Dec-06 6:58 
GeneralRe: Sound Async?? Pin
Muammar©30-Dec-06 20:47
Muammar©30-Dec-06 20:47 
AnswerRe: Sound Async?? Pin
Judah Gabriel Himango26-Dec-06 7:38
sponsorJudah Gabriel Himango26-Dec-06 7:38 
GeneralRe: Sound Async?? Pin
Luc Pattyn26-Dec-06 7:43
sitebuilderLuc Pattyn26-Dec-06 7:43 
GeneralRe: Sound Async?? Pin
Muammar©30-Dec-06 21:13
Muammar©30-Dec-06 21:13 
GeneralRe: Sound Async?? Pin
Muammar©30-Dec-06 21:14
Muammar©30-Dec-06 21:14 
Questionhow can ı get URL ? Pin
asay26-Dec-06 4:33
asay26-Dec-06 4:33 
AnswerRe: how can ı get URL ? Pin
Niiiissssshhhhhuuuuu26-Dec-06 17:21
Niiiissssshhhhhuuuuu26-Dec-06 17:21 
QuestionWindows CardSpace effect Pin
Kel_26-Dec-06 4:07
Kel_26-Dec-06 4:07 
AnswerRe: Windows CardSpace effect Pin
WillemM26-Dec-06 4:18
WillemM26-Dec-06 4:18 
GeneralRe: Windows CardSpace effect Pin
Kel_26-Dec-06 4:23
Kel_26-Dec-06 4:23 
QuestionDynamic value for new row in DataGrid Pin
AndrusM26-Dec-06 3:15
AndrusM26-Dec-06 3:15 
AnswerRe: Dynamic value for new row in DataGrid Pin
Nader Elshehabi26-Dec-06 8:02
Nader Elshehabi26-Dec-06 8:02 
GeneralRe: Dynamic value for new row in DataGrid Pin
AndrusM27-Dec-06 0:11
AndrusM27-Dec-06 0:11 

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.