Click here to Skip to main content
15,886,701 members
Home / Discussions / C#
   

C#

 
AnswerRe: implementing shortcut keys Pin
PIEBALDconsult24-Jul-08 8:27
mvePIEBALDconsult24-Jul-08 8:27 
GeneralRe: implementing shortcut keys Pin
ankkit25-Jul-08 7:08
ankkit25-Jul-08 7:08 
GeneralRe: implementing shortcut keys Pin
PIEBALDconsult25-Jul-08 10:58
mvePIEBALDconsult25-Jul-08 10:58 
QuestionHow to set different color for different items in a list box. (asp.net page, C# backend) Pin
mdpavel24-Jul-08 6:46
mdpavel24-Jul-08 6:46 
AnswerRe: How to set different color for different items in a list box. (asp.net page, C# backend) Pin
Christian Graus24-Jul-08 10:59
protectorChristian Graus24-Jul-08 10:59 
AnswerRe: How to set different color for different items in a list box. (asp.net page, C# backend) Pin
nelsonpaixao24-Jul-08 13:10
nelsonpaixao24-Jul-08 13:10 
QuestionBitwise Circular Shift in C# Pin
Ian Uy24-Jul-08 6:38
Ian Uy24-Jul-08 6:38 
AnswerRe: Bitwise Circular Shift in C# [modified] Pin
User 665824-Jul-08 7:16
User 665824-Jul-08 7:16 
I love this sort of stuff. Something I just hacked together:

static byte CircularBitwiseShiftLeft(byte value, int times)
{
    for (int i = 0; i < times % 8; i++)
    {
        value = (byte)((value << 1) | (value >> 7));
    }

    return value;
}

static byte CircularBitwiseShiftRight(byte value, int times)
{
    for (int i = 0; i < times % 8; i++)
    {
        value = (byte)((value >> 1) | ((value & 0x1) << 7));
    }

    return value;
}


/edit: added % 8 to eliminate duplicate rotations for times > 8

regards

modified on Thursday, July 24, 2008 1:32 PM


modified 12-Sep-18 21:01pm.

GeneralRe: Bitwise Circular Shift in C# Pin
Ian Uy24-Jul-08 7:26
Ian Uy24-Jul-08 7:26 
GeneralRe: Bitwise Circular Shift in C# Pin
User 665824-Jul-08 7:31
User 665824-Jul-08 7:31 
GeneralRe: Bitwise Circular Shift in C# Pin
Luc Pattyn24-Jul-08 7:36
sitebuilderLuc Pattyn24-Jul-08 7:36 
GeneralRe: Bitwise Circular Shift in C# Pin
PIEBALDconsult24-Jul-08 8:43
mvePIEBALDconsult24-Jul-08 8:43 
GeneralRe: Bitwise Circular Shift in C# Pin
Guffa24-Jul-08 23:06
Guffa24-Jul-08 23:06 
GeneralRe: Bitwise Circular Shift in C# Pin
PIEBALDconsult25-Jul-08 11:03
mvePIEBALDconsult25-Jul-08 11:03 
AnswerRe: Bitwise Circular Shift in C# Pin
Ennis Ray Lynch, Jr.24-Jul-08 12:15
Ennis Ray Lynch, Jr.24-Jul-08 12:15 
GeneralRe: Bitwise Circular Shift in C# Pin
Ian Uy25-Jul-08 16:05
Ian Uy25-Jul-08 16:05 
Questionhow to "copy local dependencies" in C# !? Pin
Skeletor2324-Jul-08 4:21
Skeletor2324-Jul-08 4:21 
AnswerRe: how to "copy local dependencies" in C# !? Pin
Frank Horn24-Jul-08 4:28
Frank Horn24-Jul-08 4:28 
GeneralRe: how to "copy local dependencies" in C# !? Pin
Skeletor2328-Jul-08 22:32
Skeletor2328-Jul-08 22:32 
GeneralRe: how to "copy local dependencies" in C# !? Pin
Frank Horn28-Jul-08 23:25
Frank Horn28-Jul-08 23:25 
AnswerRe: how to "copy local dependencies" in C# !? Pin
J a a n s24-Jul-08 4:45
professionalJ a a n s24-Jul-08 4:45 
QuestionStruct / Class strange problem Pin
lune1224-Jul-08 4:16
lune1224-Jul-08 4:16 
AnswerRe: Struct / Class strange problem Pin
leppie24-Jul-08 4:31
leppie24-Jul-08 4:31 
AnswerRe: Struct / Class strange problem Pin
User 665824-Jul-08 6:56
User 665824-Jul-08 6:56 
AnswerRe: Struct / Class strange problem Pin
Guffa24-Jul-08 11:10
Guffa24-Jul-08 11:10 

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.