Click here to Skip to main content
16,009,318 members
Home / Discussions / C#
   

C#

 
GeneralRe: NotifyIcon text? Pin
sasdav25-Jul-02 2:32
sasdav25-Jul-02 2:32 
QuestionCorrect way to try-catch in foreach loop? Pin
leppie22-Jul-02 22:15
leppie22-Jul-02 22:15 
AnswerRe: Correct way to try-catch in foreach loop? Pin
James T. Johnson22-Jul-02 23:08
James T. Johnson22-Jul-02 23:08 
GeneralRe: Correct way to try-catch in foreach loop? Pin
leppie23-Jul-02 0:06
leppie23-Jul-02 0:06 
GeneralRe: Correct way to try-catch in foreach loop? Pin
James T. Johnson23-Jul-02 0:27
James T. Johnson23-Jul-02 0:27 
GeneralRe: Correct way to try-catch in foreach loop? Pin
leppie23-Jul-02 0:45
leppie23-Jul-02 0:45 
GeneralRe: Correct way to try-catch in foreach loop? Pin
James T. Johnson23-Jul-02 1:24
James T. Johnson23-Jul-02 1:24 
GeneralRe: Correct way to try-catch in foreach loop? Pin
jparsons23-Jul-02 1:46
jparsons23-Jul-02 1:46 
Tad bit nitpicky but this code could be a little bit faster.

<br />
 if (player is Dealer)        <br />
{           <br />
    Dealer dealer = player as Dealer;             <br />
    dealer.DoDealerStuff();        <br />
}<br />


In this code the CLR must determine the type of player twice. The first time it will check when you call "player is Dealer". Then it has to check again which you do player as Dealer. It would be slightly more efficient to write it this way.

<br />
Dealer dealer = player as Dealer;<br />
if ( dealer != null ) {<br />
  dealer.DoStuff();<br />
}<br />


Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
GeneralRe: Correct way to try-catch in foreach loop? Pin
leppie23-Jul-02 7:17
leppie23-Jul-02 7:17 
GeneralNon-client area of controls Pin
Kastro22-Jul-02 18:32
Kastro22-Jul-02 18:32 
GeneralProperty Grid without an object Pin
Luis Alonso Ramos22-Jul-02 14:43
Luis Alonso Ramos22-Jul-02 14:43 
GeneralRe: Property Grid without an object Pin
James T. Johnson22-Jul-02 17:54
James T. Johnson22-Jul-02 17:54 
GeneralRe: Property Grid without an object Pin
Luis Alonso Ramos22-Jul-02 18:55
Luis Alonso Ramos22-Jul-02 18:55 
GeneralRe: Property Grid without an object Pin
James T. Johnson22-Jul-02 23:16
James T. Johnson22-Jul-02 23:16 
GeneralRe: Property Grid without an object Pin
leppie22-Jul-02 20:40
leppie22-Jul-02 20:40 
GeneralRe: Property Grid without an object Pin
Luis Alonso Ramos24-Jul-02 5:53
Luis Alonso Ramos24-Jul-02 5:53 
GeneralRe: Property Grid without an object Pin
Nathan Blomquist24-Jul-02 6:32
Nathan Blomquist24-Jul-02 6:32 
GeneralRe: Property Grid without an object Pin
Luis Alonso Ramos24-Jul-02 7:32
Luis Alonso Ramos24-Jul-02 7:32 
GeneralRe: Property Grid without an object Pin
Luis Alonso Ramos24-Jul-02 9:49
Luis Alonso Ramos24-Jul-02 9:49 
GeneralRe: Property Grid without an object Pin
Nathan Blomquist24-Jul-02 10:14
Nathan Blomquist24-Jul-02 10:14 
GeneralRe: Property Grid without an object Pin
Luis Alonso Ramos24-Jul-02 10:48
Luis Alonso Ramos24-Jul-02 10:48 
QuestionWhat override when the control is added? Pin
Zombies with Coffee, LLC22-Jul-02 11:04
professionalZombies with Coffee, LLC22-Jul-02 11:04 
AnswerRe: What override when the control is added? Pin
James T. Johnson22-Jul-02 13:35
James T. Johnson22-Jul-02 13:35 
GeneralRe: What override when the control is added? Pin
Zombies with Coffee, LLC23-Jul-02 5:18
professionalZombies with Coffee, LLC23-Jul-02 5:18 
GeneralCoping Files over the internet Pin
Orion Buttigieg22-Jul-02 5:53
Orion Buttigieg22-Jul-02 5:53 

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.