一度に大量のテキストをファイルに書き込む必要がありますが、特定の方法でフォーマットする必要があり、すべてを 1 行に収める必要はありません。
私が持っているコードは次のとおりです。
If System.IO.File.Exists(filepath) Then
Using reader As StreamReader = New StreamReader(filepath)
sLine = reader.ReadToEnd
End Using
Using writer As StreamWriter = New StreamWriter(filepath)
writer.Write("[HealthBarSettings]
MaxHealthTicks = 50
MaxHealthMicroTicks = 100
DefaultHealthPerMicroTick = 50
DefaultHealthPerTick = 200
DefaultHealthPerMegaTick = 1000
TickAlpha = 200
MicroTickAlpha = 140
MicroTickHeight = 0.5
MegaTickAlpha = 255
TickThickness = 1.0
MicroTickThickness = 1.0
MegaTickThickness = 2.0
UseCompression = 1
GoTransparent = 1
[GeneralDataHero]()
FadeTimerForHealthBar = 2.0
ZeroHealthAlpha = 225
FullHealthAlpha = 200
DefaultChampionCollisionRadius = 65.0")
End Using
MsgBox("File Written")
Else
MsgBox("File does not exist")
End If
しかし、それはすべてのテキストを使用するわけではなく、"[HealthBarSettings]" のみを使用し、その後自動的に引用を終了するため、機能しません。