Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我该怎么办?
一个错误表明
字符文字中的字符太多
using(var fileStream = appStorage.OpenFile!('note.txt', System.IO.FileMode.OpenOrCreate))
你的问题在这里:
'note.txt'
您需要将其更改为:
"note.txt"
单引号用于定义chars、so'c'或'a'都是'm'单引号的有效用法。如果您将有多个字符,则您正在定义一个字符串并且需要使用双引号。
char
'c'
'a'
'm'
!并摆脱OpenFile!
!
OpenFile!