public const not public ?

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Hi

public const char ETX='\u0003';

Does not seem to be public...

Why ?

If i remove the const keyword ,it then seems to work



Johan
 
I think constants are static, meaning they must be referenced from the
class, not an instance of the class.
 
Sagaert said:
Hi

public const char ETX='\u0003';

Does not seem to be public...

Why ?

If i remove the const keyword ,it then seems to work

Johan

Look into readonly.
 
Back
Top