471,310 Members | 1,058 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

is 128 bits the max?

I've written a script that uses bits to store permissions, however, once I go
over 128 bits I get an error:

System.OverflowException: Arithmetic operation resulted in an overflow.

Is this a limitation of the system?
Jul 22 '05 #1
3 1107
What do you use to store those bits ?

If you want to store more bits you'll have to use more bytes (AFAIK the .NET
framework has also a specialized class for this that could perhaps be
usefull).

Patrice

--

"P1ayboy" <P1*****@discussions.microsoft.com> a écrit dans le message de
news:9A**********************************@microsof t.com...
I've written a script that uses bits to store permissions, however, once I go over 128 bits I get an error:

System.OverflowException: Arithmetic operation resulted in an overflow.

Is this a limitation of the system?

Jul 22 '05 #2
Its ok thanks, I eventually re-cast them as integers and that seemed to solve
the problem.

"Patrice" wrote:
What do you use to store those bits ?

If you want to store more bits you'll have to use more bytes (AFAIK the .NET
framework has also a specialized class for this that could perhaps be
usefull).

Patrice

--

"P1ayboy" <P1*****@discussions.microsoft.com> a écrit dans le message de
news:9A**********************************@microsof t.com...
I've written a script that uses bits to store permissions, however, once I

go
over 128 bits I get an error:

System.OverflowException: Arithmetic operation resulted in an overflow.

Is this a limitation of the system?


Jul 22 '05 #3
In case you would like to give a further look, see the BitArray class...

Patrice

--

"P1ayboy" <P1*****@discussions.microsoft.com> a écrit dans le message de
news:17**********************************@microsof t.com...
Its ok thanks, I eventually re-cast them as integers and that seemed to solve the problem.

"Patrice" wrote:
What do you use to store those bits ?

If you want to store more bits you'll have to use more bytes (AFAIK the ..NET framework has also a specialized class for this that could perhaps be
usefull).

Patrice

--

"P1ayboy" <P1*****@discussions.microsoft.com> a écrit dans le message de
news:9A**********************************@microsof t.com...
I've written a script that uses bits to store permissions, however, once I
go
over 128 bits I get an error:

System.OverflowException: Arithmetic operation resulted in an

overflow.
Is this a limitation of the system?


Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Ben | last post: by
40 posts views Thread by aku | last post: by
7 posts views Thread by sathyashrayan | last post: by
6 posts views Thread by barcaroller | last post: by
5 posts views Thread by Oyvind Eriksen | last post: by
15 posts views Thread by steve yee | last post: by
11 posts views Thread by Mack | last post: by
77 posts views Thread by borophyll | last post: by
11 posts views Thread by JoeC | last post: by
11 posts views Thread by spasmous | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.