Who favors the current D1 situation?

Christopher Wright dhasenan at gmail.com
Fri Mar 7 18:48:56 PST 2008


Bill Baxter wrote:
> What's the deal with const in C#?  Anyone care to give a summary?  I see 
> conflicting things in my googling.  Somethign about readonly objects, 
> but no const/readonly for parameters to functions?
> 
> --bb

const: compile-time constant.
readonly: you can assign it exactly once, and (IIRC) only field 
assignment or in a constructor. You can modify it after, though.



More information about the Digitalmars-d mailing list