You must Sign In to post a response.
  • Category: .NET

    LargeInteger clarification

    LargeInteger testVariable =null;
    (((long)(testVariable.HighPart) << 32) + (long)testVariable.LowPart);

    What is testVariable.HighPart << 32 means? what's the output of the above line?
    Also What is testVariable.LowPart means?

    Why << 32 used along with HighPart property?
  • #769227
    Hi,

    I guess you are considering Shift Operator.
    << - Consider to be a Shift operator.
    Let see example how it works

    1 << 3 This means 1000 so this is equal to 8

    Similarly for 32 you should place the 1 in the 32 bit

    testVariable.HighPart is 1
    testVariable.Lowpart is 0

    Thanks,
    Mani


  • Sign In to post your comments