Click here to Skip to main content
15,914,255 members
Home / Discussions / C#
   

C#

 
QuestionDoubt in Switch-Case statement. Pin
He is Cool5-Oct-06 0:41
He is Cool5-Oct-06 0:41 
AnswerRe: Doubt in Switch-Case statement. Pin
albCode5-Oct-06 0:48
albCode5-Oct-06 0:48 
GeneralRe: Doubt in Switch-Case statement. Pin
He is Cool5-Oct-06 0:53
He is Cool5-Oct-06 0:53 
GeneralRe: Doubt in Switch-Case statement. Pin
Colin Angus Mackay5-Oct-06 0:54
Colin Angus Mackay5-Oct-06 0:54 
GeneralRe: Doubt in Switch-Case statement. Pin
Christian Graus5-Oct-06 1:00
protectorChristian Graus5-Oct-06 1:00 
AnswerRe: Doubt in Switch-Case statement. Pin
Christian Graus5-Oct-06 0:53
protectorChristian Graus5-Oct-06 0:53 
GeneralRe: Doubt in Switch-Case statement. Pin
Colin Angus Mackay5-Oct-06 1:04
Colin Angus Mackay5-Oct-06 1:04 
AnswerRe: Doubt in Switch-Case statement. Pin
Colin Angus Mackay5-Oct-06 0:53
Colin Angus Mackay5-Oct-06 0:53 
He is Cool wrote:
Would be much happy to know the logic behind this


Only constants are known at compile time. The value must be known at compile time for it to generate a valid switch statement.

With a static the value can be changed at any time during the run of the program. With a readonly the value is set at runtime, although it cannot be changed once set.

So, you can only provide a constant value. Either a literal value or something set as a const, just as the compiler says.


QuestionProperty Grid Pin
praveenqwe5-Oct-06 0:39
praveenqwe5-Oct-06 0:39 
AnswerRe: Property Grid Pin
visualhint6-Oct-06 2:13
visualhint6-Oct-06 2:13 
QuestionHit the Enter in Textbox the value will be displayed in other textbox Pin
irkahc5-Oct-06 0:36
irkahc5-Oct-06 0:36 
AnswerRe: Hit the Enter in Textbox the value will be displayed in other textbox Pin
Christian Graus5-Oct-06 1:01
protectorChristian Graus5-Oct-06 1:01 
QuestionLive streaming with Direct Show Pin
AB77715-Oct-06 0:35
AB77715-Oct-06 0:35 
Questionhi plz help how to send data to COM port using C#.net 2003 ans framework1.1 Pin
premkamalg5-Oct-06 0:14
premkamalg5-Oct-06 0:14 
QuestionHow to print Datagrid in C# ? Pin
hdv2125-Oct-06 0:07
hdv2125-Oct-06 0:07 
QuestionHow to read a exact line from .txt file Pin
CodeItWell4-Oct-06 23:47
CodeItWell4-Oct-06 23:47 
AnswerRe: How to read a exact line from .txt file Pin
Christian Graus5-Oct-06 0:56
protectorChristian Graus5-Oct-06 0:56 
QuestionDataGridView update to database fails Pin
Alex.Suelzle4-Oct-06 23:46
Alex.Suelzle4-Oct-06 23:46 
AnswerRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 1:22
topcatalpha5-Oct-06 1:22 
GeneralRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 20:21
Alex.Suelzle5-Oct-06 20:21 
GeneralRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 20:37
topcatalpha5-Oct-06 20:37 
GeneralRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 21:41
Alex.Suelzle5-Oct-06 21:41 
GeneralRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 21:48
topcatalpha5-Oct-06 21:48 
AnswerRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 22:42
Alex.Suelzle5-Oct-06 22:42 
QuestionEEException ?! Pin
Jon Hulatt4-Oct-06 23:37
Jon Hulatt4-Oct-06 23:37 

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.