C# C# Basics C# Syntax Variables

dom and quotes

I want to enhance my programming / dev skills and actually go beyond web. So I started researching c#. I LOVE that it has parallels with javascript! But I have some questions about the language / syntax and usage. I like writing my javascript with single quotes and when I reference html I use double quotes. Can you use single quotes when programming c#? Can you use c# for web dev, and manipulate dom elements? Just wondering if I could develop web applications that us c# and manipulate / add to the dom?

2 Answers

Steven Parker
Steven Parker
182,355 Points

In C#, quote types have special meanings and are not interchangeable. Double quotes are used for strings (like "this example"), but single quotes (apostrophes) are only for individual characters (like 'c' or 'x').

And JavaScript is the language for DOM manipulation because it's built into every browser. But C# is a good language for back-end development.

thank you :)