Look up the StructLayoutAttribute attribute along with the
FieldOffsetAttribute attribute. Using these you can define a new 128 bit
integer value type, Int128. See my previous post for addition and
subtraction of this new type. You will need to be inventive on the addition
algorithum since as you will soon find a simple member by member addition of
the two lower 64 bits can produce a stack overflow for an Int64. Think of
how you created the Int128 and apply this logic to an Int64. One solution
calls for a private value type nested within the Int128 value type to handle
the Int64 addition.
That is all I am prepared to say as any more will give the intire
implimentation away and then I will have to charge you a design fee. :)
--Robby
"Mohit Gupta" <Mo********@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
Though your post is bit of help to me but that does not answers my
question.
How can I save a number like 237498237498237493274230470327 in a variable?
Do you have any idea how to create such a big number?
I know that in java there is a BigInteger class. Any idea to create it?
"Robby" wrote:
You need to use attributes on structures and define both an Add and
Equals
method. You may want to use the comparable interface. If you are using
C#
then you do not need an Add and Equals method since you can simply
override
the + and = operators. However, you have to wait until .Net 2.0 to
override
operators in VB.
Robby
"Mohit Gupta" <Mo********@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com... > How do I generate Big Integers in VB .NET?
>
> For example, if I have a number like
>
> 98908324328432864872364234623874682342234234242342
>
> that can't be stored in INT64 or INT32 type variable. How can I
> generate
> it?
>
> Secondly, how will I multiply 2 big Integers?
>
> Your help will be