Click here to Skip to main content
16,010,268 members
Home / Discussions / C#
   

C#

 
GeneralPassing null to extern functions Pin
leppie15-Aug-02 15:14
leppie15-Aug-02 15:14 
GeneralRe: Passing null to extern functions Pin
albean15-Aug-02 18:02
albean15-Aug-02 18:02 
GeneralRe: Passing null to extern functions Pin
leppie16-Aug-02 0:27
leppie16-Aug-02 0:27 
GeneralRe: Passing null to extern functions Pin
Richard Deeming16-Aug-02 1:30
mveRichard Deeming16-Aug-02 1:30 
GeneralRe: Passing null to extern functions Pin
leppie16-Aug-02 1:38
leppie16-Aug-02 1:38 
GeneralProblem solved :) Pin
leppie16-Aug-02 14:09
leppie16-Aug-02 14:09 
GeneralCasting Repost Pin
leppie15-Aug-02 6:10
leppie15-Aug-02 6:10 
GeneralRe: Casting Repost Pin
Nick Parker15-Aug-02 10:44
protectorNick Parker15-Aug-02 10:44 
You might want to think about doing something like this:

Byte b = 200;
if(b < (int)SByte.MaxValue)
{
   SByte sb = (SByte)b;
   Console.WriteLine(sb);
}
else
{
   Console.WriteLine("b is too large.");
}


Essentially you get caught in what I like to think of as a loop, but it isn't. When you go beyond the max (i.e. - MaxValue + 1;) it will then wrap to the largest negative value. The -55 is correct, it is out of bounds and that's what it is trying to show you. I know you can do checked{...} and unchecked{...} blocks with certain data types which will allow you to control whether or not an exception is thrown, you may or may not be able to use this here.

HTH


Nick Parker


GeneralRe: Casting Repost Pin
leppie15-Aug-02 13:54
leppie15-Aug-02 13:54 
GeneralRe: Casting Repost Pin
Eric Gunnerson (msft)16-Aug-02 7:06
Eric Gunnerson (msft)16-Aug-02 7:06 
GeneralRe: Casting Repost Pin
leppie17-Aug-02 3:18
leppie17-Aug-02 3:18 
GeneralHLS to RGB and RGB to HLS Pin
Derek Lakin15-Aug-02 4:24
Derek Lakin15-Aug-02 4:24 
GeneralRe: HLS to RGB and RGB to HLS Pin
leppie15-Aug-02 6:35
leppie15-Aug-02 6:35 
GeneralRe: HLS to RGB and RGB to HLS Pin
leppie15-Aug-02 7:06
leppie15-Aug-02 7:06 
GeneralRe: HLS to RGB and RGB to HLS Pin
Derek Lakin15-Aug-02 19:58
Derek Lakin15-Aug-02 19:58 
GeneralActiveX and C# controls Pin
Shaun Wilde15-Aug-02 1:35
Shaun Wilde15-Aug-02 1:35 
GeneralRe: ActiveX and C# controls Pin
Andy Smith15-Aug-02 4:44
Andy Smith15-Aug-02 4:44 
GeneralClickety Pin
David Stone15-Aug-02 6:04
sitebuilderDavid Stone15-Aug-02 6:04 
GeneralRe: ActiveX and C# controls Pin
Shaun Wilde15-Aug-02 22:44
Shaun Wilde15-Aug-02 22:44 
GeneralRe: ActiveX and C# controls Pin
James T. Johnson16-Aug-02 2:17
James T. Johnson16-Aug-02 2:17 
Generaldynamic object creation using eval Pin
chajadan14-Aug-02 20:12
chajadan14-Aug-02 20:12 
GeneralRe: dynamic object creation using eval Pin
Stephane Rodriguez.14-Aug-02 22:04
Stephane Rodriguez.14-Aug-02 22:04 
QuestionAm I dreaming? Pin
leppie14-Aug-02 14:21
leppie14-Aug-02 14:21 
AnswerRe: Am I dreaming? Pin
Nick Hodapp14-Aug-02 14:48
sitebuilderNick Hodapp14-Aug-02 14:48 
GeneralRe: Am I dreaming? Pin
Ray Cassick14-Aug-02 15:28
Ray Cassick14-Aug-02 15:28 

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.