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

C#

 
GeneralBinding array to combobox Pin
Anonymous10-Feb-04 20:05
Anonymous10-Feb-04 20:05 
QuestionPanel Control covering my other controls... IDE BUG? Pin
gordingin10-Feb-04 16:15
gordingin10-Feb-04 16:15 
AnswerRe: Panel Control covering my other controls... IDE BUG? Pin
Heath Stewart11-Feb-04 3:14
protectorHeath Stewart11-Feb-04 3:14 
GeneralC# communication with events Pin
MusicAlly10-Feb-04 14:45
MusicAlly10-Feb-04 14:45 
GeneralRe: C# communication with events Pin
Kentamanos10-Feb-04 15:35
Kentamanos10-Feb-04 15:35 
GeneralRe: C# communication with events Pin
MusicAlly10-Feb-04 16:54
MusicAlly10-Feb-04 16:54 
GeneralRe: C# communication with events Pin
Heath Stewart11-Feb-04 3:52
protectorHeath Stewart11-Feb-04 3:52 
GeneralCompiler Optimizations Pin
Andrew Shapira10-Feb-04 13:44
Andrew Shapira10-Feb-04 13:44 
Where is a discussion of the current and future optimizations that the C# compilers do? When I see things like the following I start to question my faith in csc being good at optimizing. (The same kind of thing shows up in cordbg when looking at the JIT code for a similar example.)

% cat y.cs

using System;

class A {
bool On { get { return true; } }
public void Print() {
if (On) {
Console.WriteLine("On");
}
}
}

class ConditionalTest {

static void Main()
{
A a = new A();
a.Print();
}
}

% csc /optimize+ y.cs

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

% ildasm y.exe

.method public hidebysig instance void Print() cil managed
{
// Code size 19 (0x13)
.maxstack 2
IL_0000: ldarg.0
IL_0001: call instance bool A::get_On()
IL_0006: brfalse.s IL_0012
IL_0008: ldstr "On"
IL_000d: call void [mscorlib]System.Console::WriteLine(string)
IL_0012: ret
} // end of method A::Print

%

At least the compiler eliminates the "if" test when "On" is replaced with "true" in the test.


GeneralVS-style colors Pin
Judah Gabriel Himango10-Feb-04 10:30
sponsorJudah Gabriel Himango10-Feb-04 10:30 
GeneralRe: VS-style colors Pin
Heath Stewart10-Feb-04 11:33
protectorHeath Stewart10-Feb-04 11:33 
GeneralRe: VS-style colors Pin
Uwe Keim11-Feb-04 1:47
sitebuilderUwe Keim11-Feb-04 1:47 
GeneralRe: VS-style colors Pin
Judah Gabriel Himango11-Feb-04 4:48
sponsorJudah Gabriel Himango11-Feb-04 4:48 
GeneralRe: VS-style colors Pin
Heath Stewart11-Feb-04 5:12
protectorHeath Stewart11-Feb-04 5:12 
GeneralProgrammatic mouse movement Pin
Darryl Borden10-Feb-04 10:29
Darryl Borden10-Feb-04 10:29 
GeneralRe: Programmatic mouse movement Pin
Judah Gabriel Himango10-Feb-04 10:33
sponsorJudah Gabriel Himango10-Feb-04 10:33 
GeneralDebugging into a reference Pin
gordingin10-Feb-04 10:23
gordingin10-Feb-04 10:23 
GeneralRe: Debugging into a reference Pin
Bill Dean10-Feb-04 10:29
Bill Dean10-Feb-04 10:29 
GeneralRe: Debugging into a reference Pin
gordingin10-Feb-04 10:34
gordingin10-Feb-04 10:34 
GeneralRe: Debugging into a reference Pin
Heath Stewart10-Feb-04 11:35
protectorHeath Stewart10-Feb-04 11:35 
GeneralRe: Debugging into a reference Pin
gordingin11-Feb-04 3:57
gordingin11-Feb-04 3:57 
Generalparallel port Pin
Member 87345210-Feb-04 7:51
Member 87345210-Feb-04 7:51 
GeneralRe: parallel port Pin
Marc Clifton10-Feb-04 8:39
mvaMarc Clifton10-Feb-04 8:39 
GeneralRe: parallel port Pin
Marc Clifton10-Feb-04 9:41
mvaMarc Clifton10-Feb-04 9:41 
GeneralBetter yet... Pin
Marc Clifton10-Feb-04 9:42
mvaMarc Clifton10-Feb-04 9:42 
GeneralRe: parallel port Pin
mohdshiraz10-Feb-04 18:27
mohdshiraz10-Feb-04 18:27 

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.