嗨有没有更简单的方法可以在一个文件中写入多行,其中包含引号和其他类似的东西,或者是这样做的唯一方法
Dim objwriter As New System.IO.StreamWriter(AppsDir & "EthIPChanger.bat")
objwriter.WriteLine("@echo off")
objwriter.WriteLine("netsh interface ip set address name=""" & "Local Area Connection""" & " static " & TB_EthIPAddress.Text & " " & TB_EthSubnetMask.Text & " " & TB_EthDefaultGateway.Text & " 1")
objwriter.WriteLine("netsh interface ip set dns """ & "Local Area Connection""" & " static " & TB_EthDNS1.Text)
objwriter.WriteLine("ipconfig /all > """ & AppsDir & "NetworkInfo.txt""")
objwriter.WriteLine("echo hi > """ & AppsDir & "CheckLen.txt""")
objwriter.Close()
我知道如果你使用 python 你可以做 """ 然后在里面做任何事情并以 """ 结束
vb.net中是否存在类似的东西?
谢谢