Maby a stupid question but...

Vote:
 

I have seen in examples in the documentation that sometimes a property is written:

public virtual String IntroText { get; set; }

and othertimes

public virtual string IntroText { get; set; }

string is just an alias for System.String so there are no differens between them but I wonder what is the prefered way to write it semantically

#118156
Mar 01, 2015 20:52
Vote:
 

More details: http://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string.

Frederik

#118162
Mar 02, 2015 2:46
Vote:
 

Thanks Frederik, I know the difference, I am more interested in knowing if there are are kind of best practices from EPiServer on which to use.

#118171
Mar 02, 2015 7:47
Vote:
 

I don't think we have any best practice for this because at runtime level they are the same. If I am to give recommendation then it would be choose one and stick with it for consistency. We - Commerce team choose string over String.

/Q

#118218
Mar 02, 2015 21:24
Vote:
 

Ok, thanks Quan, that is what I prefers as well

#118219
Mar 02, 2015 21:54
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.