Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / June 2005

Tip: Looking for answers? Try searching our database.

is 128 bits the max?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
P1ayboy - 28 Jun 2005 09:44 GMT
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?
Patrice - 28 Jun 2005 09:49 GMT
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

> 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?
P1ayboy - 28 Jun 2005 10:22 GMT
Its ok thanks, I eventually re-cast them as integers and that seemed to solve
the problem.

> What do you use to store those bits  ?
>
[quoted text clipped - 11 lines]
> >
> > Is this a limitation of the system?
Patrice - 28 Jun 2005 10:37 GMT
In case you would like to give a further look, see the BitArray class...

Patrice

> Its ok thanks, I eventually re-cast them as integers and that seemed to solve
> the problem.
[quoted text clipped - 14 lines]
> > >
> > > Is this a limitation of the system?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.