Click here to Skip to main content
15,908,775 members
Home / Discussions / C#
   

C#

 
GeneralRe: Embedded Forms? Panels? Other? Pin
tim.walter20-Oct-11 4:20
tim.walter20-Oct-11 4:20 
GeneralRe: Embedded Forms? Panels? Other? Pin
Wayne Gaylard20-Oct-11 4:27
professionalWayne Gaylard20-Oct-11 4:27 
GeneralRe: Embedded Forms? Panels? Other? Pin
tim.walter20-Oct-11 4:30
tim.walter20-Oct-11 4:30 
GeneralRe: Embedded Forms? Panels? Other? Pin
BobJanova20-Oct-11 4:46
BobJanova20-Oct-11 4:46 
AnswerRe: Embedded Forms? Panels? Other? Pin
PIEBALDconsult20-Oct-11 4:21
mvePIEBALDconsult20-Oct-11 4:21 
Questionusing bitwise operators on ushort Pin
__John_20-Oct-11 2:37
__John_20-Oct-11 2:37 
AnswerRe: using bitwise operators on ushort Pin
BobJanova20-Oct-11 3:09
BobJanova20-Oct-11 3:09 
AnswerRe: using bitwise operators on ushort Pin
Richard MacCutchan20-Oct-11 3:25
mveRichard MacCutchan20-Oct-11 3:25 
It would appear that the logical expression is yielding an int value which is,by definition, signed. You should cast each part of the expression to uint as in the first case. you should also review your use of parentheses around your expressions, a better expression would be:
C#
	return (uint)(r | (((uint)g) << 8) | (((uint)b) << 16));
// or the even simpler, and much clearer
	return (uint)(r | (g << 8) | (b << 16));

Unrequited desire is character building. OriginalGriff


GeneralRe: using bitwise operators on ushort Pin
__John_20-Oct-11 3:44
__John_20-Oct-11 3:44 
GeneralRe: using bitwise operators on ushort Pin
Richard MacCutchan20-Oct-11 4:11
mveRichard MacCutchan20-Oct-11 4:11 
QuestionHow to generate the area of the irregular polygon Pin
sivakumarmr1019-Oct-11 21:10
sivakumarmr1019-Oct-11 21:10 
AnswerRe: How to generate the area of the irregular polygon Pin
BillWoodruff19-Oct-11 22:04
professionalBillWoodruff19-Oct-11 22:04 
AnswerRe: How to generate the area of the irregular polygon Pin
BobJanova19-Oct-11 22:15
BobJanova19-Oct-11 22:15 
GeneralRe: How to generate the area of the irregular polygon Pin
CDP180219-Oct-11 22:57
CDP180219-Oct-11 22:57 
AnswerRe: How to generate the area of the irregular polygon Pin
Pascal Ganaye19-Oct-11 23:24
Pascal Ganaye19-Oct-11 23:24 
GeneralRe: How to generate the area of the irregular polygon Pin
Luc Pattyn19-Oct-11 23:44
sitebuilderLuc Pattyn19-Oct-11 23:44 
GeneralRe: How to generate the area of the irregular polygon Pin
BobJanova20-Oct-11 0:30
BobJanova20-Oct-11 0:30 
GeneralRe: How to generate the area of the irregular polygon Pin
BillWoodruff20-Oct-11 19:43
professionalBillWoodruff20-Oct-11 19:43 
QuestionGet free memory Pin
Mehdi Gholam19-Oct-11 20:19
Mehdi Gholam19-Oct-11 20:19 
AnswerRe: Get free memory Pin
André Kraak19-Oct-11 21:35
André Kraak19-Oct-11 21:35 
AnswerRe: Get free memory Pin
OriginalGriff19-Oct-11 22:39
mveOriginalGriff19-Oct-11 22:39 
AnswerRe: Get free memory Pin
Dave Kreskowiak20-Oct-11 1:53
mveDave Kreskowiak20-Oct-11 1:53 
QuestionDataGridView question Pin
Tom Paronis19-Oct-11 11:55
Tom Paronis19-Oct-11 11:55 
AnswerRe: DataGridView question Pin
Eddy Vluggen20-Oct-11 1:57
professionalEddy Vluggen20-Oct-11 1:57 
GeneralRe: DataGridView question Pin
Tom Paronis20-Oct-11 9:05
Tom Paronis20-Oct-11 9:05 

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.