Unfortunately you have a few answers, but none really give the code you need to fix your problem.
There are two + operators in C# (just like 2 - operators, although the unary + is much less useful). The unary version uses a single argument to explicitly identify the right side of the equation as positive, just like you would with a negative number (i.e. -10).
To fix your problem, you need to create a binary operator:
public static bigint operator+(bigint lhs, bigint rhs)
{
//Code here
}
The reason you are getting the error that you are is that operator overloads must be defined as static methods. Static methods are not tied to any instance of the class that they are defined in, so when you say a.Length it doesn't have any idea what a is (it does, but it realizes you are trying to use an instance variable/property from a static method).
Also realize that you have to return a new instance of bigint that contains the result of the operation, you should not ever modify the operands directly! Why?
Think of it like this, if you have:
bigint a = new bigint();
bigint b = new bigint();
bigint c = a + b;
The way you have it written, the result will either store in a or b, but nothing in c. That means that you've modified a and/or b unpredictably.
Think of static methods like extensions to your class, they can't talk to anything that is an instance (not declared with static). It wouldn't make sense to make a static since it has to contain different values for different instances of bigint.
So the fix here is to simply implement the binary + operator correctly. Usually I name them lhs and rhs for "left hand side" and "right hand side" respectively so I know which operand is on which side (which is important for some operations like division).
bigintparameters and returns a new instance:public static bigint operator +(bigint b1, bigint b2)+operator, not the addition operator. There is no reference to instance fields (a) in static methods since a static method does not belong to any one instance of yourbigintclass.