Re: Declaring a constant
- From: "Randy A. Ynchausti" <randy_ynchausti@xxxxxxx>
- Date: Thu, 26 Jan 2006 23:16:25 -0700
Chris,
>I have made a declaration like this:
>
> private const Complex I = new Complex(0.0, 1.0);
>
> When I try to build this I get the error:
>
> The expression being assigned to 'ComplexNumberLib.ComplexMath.I' must be
> constant.
A constant expression is an expression that can be fully evaluated at
compile time. Therefore, the only possible values for constants of reference
types are string and null.
Regards,
Randy
.
- References:
- Declaring a constant
- From: Chris Saunders
- Declaring a constant
- Prev by Date: Declaring a constant
- Next by Date: C# ListView question
- Previous by thread: Declaring a constant
- Next by thread: Re: Declaring a constant
- Index(es):
Relevant Pages
|