12
In PHP, when we use single quotes or double quotes, both forms have the functionality to declare a string. There is only one small difference.
I am now starting a study with C#. When I went to try to declare a string with single quotes, an error was generated.
[Table('ProductSuppliers')]
Too Many characters in Character literal
In PHP there was no problem to use simple quotes in cases like the one shown above.
Since the error is being pointed out, it makes me think that the simple quotes do not have the purpose that I was thinking.
What is the purpose of Single Quotes in C#?
What’s her difference to Double Quotes?
Why did the error described above occur when I tried to use the statement
'ProductSupplier'
?
TL;DR;: Single quotes:
char
. Double quotes: chain ofchars
(string
)– Jéf Bueno
This -1 could be explained there. So I could improve the details of the question, since it contains some error
– Wallace Maxters