What's the difference between double quotes and single quote in C#

后端 未结 5 1135
天命终不由人
天命终不由人 2020-12-02 21:49

What\'s the difference between double quotes and single quote in C#?

I coded a program to count how many words are in a file

using System;
using Syst         


        
5条回答
  •  温柔的废话
    2020-12-02 22:29

    the single quote represent a single character 'A', double quote append a null terminator '\0' to the end of the string literal, " " is actually " \0" which is one byte larger than the intended size.

提交回复
热议问题