Usage of Razor expressions with or without string quotes

Viewed 58

Regarding Razor expression usage (ASP.Net) cases, there are two cases commonly met:

<div title="@MyClass.Test"></div>

and

<div title=@MyClass.Test></div>

As they both seem to work the same on Razor 2.0, I would like to know if there are any differences, especially in corner cases (null/malfored values etc).

Eventually I would also like to know which is best as a practice to follow. Thank you in advance.

1 Answers
Related