Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 1st, 2005, 05:13 AM
Authorized User
 
Join Date: Jun 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to HuhOiC
Default BigNumber class

Does anyone know if .NET has a class that allows you to create numbers of unlimited size. If so what would the class name be called and the namespace it is located in.

Thank you in advance,

RAyRAy

RAyRAy
Huh O i C

Program or Be Programmed!!!
__________________
RAyRAy
Huh O i C

Program or Be Programmed!!!
 
Old March 8th, 2005, 06:21 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm pretty certain that there are NO programming languages that have a class that allows numbers of unlimited size (I'd be interested to hear different).

You'd have to create one for yourself but I imagine it would be pretty cumbersome to manage.

It is impossible to have "unlimited", you'd always be restricted by the amount of memory the computer had.

Kep.
 
Old March 10th, 2005, 07:48 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

a sort of things you want,
Code:
class Unlimited
{
  Unlimited unlimited=new Unlimited();
  //...
}
and you would receive StackOverFlow exception!

_____________
Mehdi.
software student.
 
Old March 12th, 2005, 03:33 AM
Authorized User
 
Join Date: Jun 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to HuhOiC
Default

Well I didn't mean unlimited. What I actually meant with constraints of the hardware for a given machine. I knew I should have explained it when I was writing it and that someone or several people would bring up this issue. It's of course obvious you can't unlimited anything in the real physical world.

Anyways to make a short question longer for you people. Is there any class in .NET that will let you create a number with the limits of a given hardware on that machine or any machine connected to it or any medium that will be connected to it for storage in which you can share resources through clustered computers so you can do basic manipulation of that number?

In Java it's basically the BigNumber class and it seems as though it's specifically architectured for cryptography where you have all the methods necessary for RSA, AES, etc.

Anyways long question short create a larger size number than 64bits, which you can specify within limit of hardware of course ;). So ie I want a 1024 bit number or whatever.

RAyRAy
Huh O i C

Program or Be Programmed!!!
 
Old March 15th, 2005, 08:10 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

fo n bits,you can make a new struct,and consider some integer fields within and implement its basic operations yourself..

(not an efficient way just a possibility)

_____________
Mehdi.
software student.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using logging class as a static class punitw General .NET 0 August 14th, 2008 03:03 AM
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
Class disappears in the class panel hint2310 Visual C++ 0 September 18th, 2004 03:46 PM
How to include c# class and vb class in the .vbprj umeshayk VS.NET 2002/2003 2 January 9th, 2004 12:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.