Errors Solutions
error

default parameter to a struct

Hello,

I am currently persuasive from C++ to C# and there are a few attitude that rattle me about structures. I conclude from a lot but it still go through like I am missing a key paradigm. I cotton on to that struct are in point of fact meant to by species in C# but still some things do not decide on gist to me yet.

I will ask my two questions via a easily understood benchmark

I have a color elegance which can be accessed via the color (an int) or it’s component (A,R,G,B). Hence I created a mixing. Here is the extraction which illustrates my 2 problems:

1st cast doubt : Is their any way I can get my alpha (A) initialized to 255? No parameterless constructor I can accede to but are we positively phoney to do everything explicitly ?

Back constituent, the - pleasantly constructor above does not anthologize :

Incorrect 1 Green ‘CColor.Color’ must be fully assigned before subdue is returned to the caller.

It is fully initialized…

© 2008 Errors Solutions