Using asp.net MVC I'd like to do this inside a view:
<%= Html.TextBox("textbox1", null, new { class="class1" }) %>
This statement does not compile because class is keyword in C#. I'd like to know how I can escape the property names such that this compiles.
It is possible to get this to compile if I change the "class" property to "Class" (uppercase C). But this is not suitable because strict xhtml says that all attributes (and element) names must be lowercase.
For most central air systems, the process is simple. Simply move the switch on your thermostat from “Heat” to “Cool”. If your system was off entirely, you may need to move the switch from “Off” to “Cool” instead. Once you turn your system on, be sure to close any open windows to conserve energy.
Keep the doors and windows closed when the AC is on. Avoid opening and closing the doors frequently to prevent the cool air from escaping the room. Prevent direct sunlight from entering the room. Use curtains, blinds and shades to keep the room cool.
ACEEE estimates that air conditioners use 3% to 5% less energy for every degree you raise the thermostat. To get the best energy savings, leave your thermostat set at 78 degrees or higher while you're out.
You can use keywords in C# as identifiers by prepending @ infront of them.
var @class = new object();
To quote from the MSDN Documentation on C# Keywords:
Keywords are predefined, reserved identifiers that have special meanings to the compiler. They cannot be used as identifiers in your program unless they include @ as a prefix. For example, @if is a valid identifier but if is not because if is a keyword.
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