Force C# to use ASCII

后端 未结 4 1224
一整个雨季
一整个雨季 2021-01-05 21:27

I\'m working on an application in C# and need to read and write from a particular datafile format. The only issue at the moment is that the format uses strictly single byte

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-05 22:04

    If you want this in .NET, you could use F# to make a library supporting this. F# supports ASCII strings, with a byte array as the underlying type, see Literals (F#) (MSDN):

    let asciiString = "This is a string"B
    

提交回复
热议问题