Click here to Skip to main content
16,020,628 members
Home / Discussions / C#
   

C#

 
GeneralRe: StreamReader.Write("Replace existing text entirly"); Pin
Muammar©21-Mar-07 9:09
Muammar©21-Mar-07 9:09 
AnswerRe: StreamReader.Write("Replace existing text entirly"); Pin
Keshav V. Kamat21-Mar-07 22:36
Keshav V. Kamat21-Mar-07 22:36 
GeneralRe: StreamReader.Write("Replace existing text entirly"); Pin
Muammar©21-Mar-07 23:53
Muammar©21-Mar-07 23:53 
Questionhow to start process Pin
Nkuttynasi21-Mar-07 8:17
Nkuttynasi21-Mar-07 8:17 
AnswerRe: how to start process Pin
joon vh.21-Mar-07 8:21
joon vh.21-Mar-07 8:21 
GeneralRe: how to start process Pin
Narchaithi22-Mar-07 6:46
Narchaithi22-Mar-07 6:46 
AnswerRe: how to start process Pin
Keshav V. Kamat21-Mar-07 22:43
Keshav V. Kamat21-Mar-07 22:43 
QuestionCompiler issue? Pin
Chadwick Posey21-Mar-07 8:03
Chadwick Posey21-Mar-07 8:03 
Here's an interesting one -- Can someone riddle me this?

Given:
<br />
using System;<br />
<br />
enum Foo { Bar, None }<br />
class Program<br />
{<br />
static void PrintArg(object x) { Console.WriteLine(x.ToString()); }<br />
static void PrintArg(Foo x) { Console.WriteLine(x.ToString()); }<br />
public static void Main()<br />
{<br />
PrintArg(Foo.None);<br />
PrintArg(0);<br />
PrintArg(1);<br />
}<br />
}<br />


Results in the output of:
None
Bar
1



Note: The application of this issue is apparent in the SqlParameter constructors -- If you do SqlParameter param = new SqlParameter("Name", 0); it calls the SqlDbType override, instead of the object value override.

Any ideas why the int 0 isn't acting like the int 1? Is 0 not an int by default?
Chadwick




=============================
I'm a developer, he's a developer, she's a developer, Wouldn'tcha like to be a developer too?

AnswerRe: Compiler issue? [modified] Pin
joon vh.21-Mar-07 8:11
joon vh.21-Mar-07 8:11 
GeneralRe: Compiler issue? Pin
Chadwick Posey21-Mar-07 8:21
Chadwick Posey21-Mar-07 8:21 
GeneralRe: Compiler issue? Pin
joon vh.21-Mar-07 8:56
joon vh.21-Mar-07 8:56 
GeneralRe: Compiler issue? Pin
Chadwick Posey21-Mar-07 9:26
Chadwick Posey21-Mar-07 9:26 
GeneralRe: Compiler issue? Pin
joon vh.21-Mar-07 9:08
joon vh.21-Mar-07 9:08 
GeneralRe: Compiler issue? Pin
Chadwick Posey21-Mar-07 9:58
Chadwick Posey21-Mar-07 9:58 
QuestionRe: Compiler issue? Pin
Chadwick Posey22-Mar-07 4:18
Chadwick Posey22-Mar-07 4:18 
AnswerRe: Compiler issue? Pin
joon vh.23-Mar-07 7:18
joon vh.23-Mar-07 7:18 
GeneralRe: Compiler issue? Pin
Chadwick Posey23-Mar-07 13:22
Chadwick Posey23-Mar-07 13:22 
JokeRe: Compiler issue? Pin
joon vh.23-Mar-07 16:22
joon vh.23-Mar-07 16:22 
QuestionSimple question about data DataSet, DataView and DataGrid Pin
goldoche21-Mar-07 7:44
goldoche21-Mar-07 7:44 
AnswerRe: Simple question about data DataSet, DataView and DataGrid Pin
Keshav V. Kamat21-Mar-07 22:41
Keshav V. Kamat21-Mar-07 22:41 
QuestionTextBox.OnTextChanged - No stack overflow?? Pin
Shy Agam21-Mar-07 7:34
Shy Agam21-Mar-07 7:34 
AnswerRe: TextBox.OnTextChanged - No stack overflow?? Pin
Edmundisme21-Mar-07 7:45
Edmundisme21-Mar-07 7:45 
GeneralRe: TextBox.OnTextChanged - No stack overflow?? Pin
Shy Agam21-Mar-07 8:03
Shy Agam21-Mar-07 8:03 
GeneralRe: TextBox.OnTextChanged - No stack overflow?? Pin
Dave Kreskowiak21-Mar-07 8:12
mveDave Kreskowiak21-Mar-07 8:12 
GeneralRe: TextBox.OnTextChanged - No stack overflow?? Pin
Shy Agam21-Mar-07 8:19
Shy Agam21-Mar-07 8:19 

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.