In my aspx pages I often use the following and it works fine:
<%= "{0}, {1}", arg1, arg2 %>
I use ReSharper for code analysis. I just upgraded for v6.1 to 7 and it is giving me the following two errors:
"Expression expected"
"Method '__ReSharper_Render' has 1 parameter(s) but is invoked with 3 argument(s)"
Is the syntax I use incorrect? I would prefer to continue using it as I find it quite elegant and compact. If it is correct (I think it should be as it works), any idea how to tell ReSharper to either ignore it or treat it as valid?
Saurabh, you are using implementation details of ASP.NET. It's bad practice. Better to specify it explicitly:
<%= string.Format("{0}, {1}", arg1, arg2) %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With