Time for action – creating a huge number API

Follow the given steps:

  1. Create a Class Library project and call it Huge.
  2. Add PowerCollections.dll in the reference for this project.
  3. Add the following class, HugeInteger, in this Class Library project:
    public class HugeInteger { /// <summary> /// Internal representation of the huge integer /// </summary> private Dictionary<int, BigList<decimal>> _huge; /// <summary> /// Creating such an empty huge integer /// </summary> public HugeInteger() { _huge = new Dictionary<int, BigList<decimal>>(); Enumerable.Range(0, 10).ToList() .ForEach(i => _huge.Add(i, new BigList<decimal>())); } /// <summary> /// Length of the huge integer /// </summary> public decimal Length { get { //As it deals with zero based indexing ...

Get .NET 4.0 Generics now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.