I have this line in vb.net. I would appreciate if you could tell me how I can enclose values ββin double quotes
dim str as string="" str.Append("EmpID=" & empNo & " DeptID=" & deptID & "")
I want the string value to be EmiID = "10" DeptID = "20"
Use double double quotes to get one double quote in a string
str.Append("EmpID=""" & empNo & """ DeptID=""" & deptID & """")
ControlChars.Quote is nice to use :)
dim metatransferString as string = ""
Just use double double quotes, for example:
dim str as string="" str.Append("EmpID=""" & empNo & """ DeptID=""" & deptID & """")
Use ControlChars.Quote
dim str as string="" str.Append("EmpID=" & cControlChars.Quote & empNo & ControlChars.Quote & " DeptID=" & ControlChars.Quote & deptID & ControlChars.Quote)
I know this is a pretty old question. But I used it that way
str.Append(String.Format("EmpID={0}{1}{0} DeptID={0}{2}{0}", Chr(34), empNo, deptID))
If empNo = 10 DeptID = 20, this will give EmpId = "10" DeptID = "20"
Source: https://habr.com/ru/post/1305490/More articles:Sql XML Column with Entity Framework - how to save minor spaces - sqlSoap WSDL with Null - nullOSGI on Google engine? - javaexcel 2007 vba: how to access HPageBreaks - excel-vbaDetermine if images are loaded in UIWebView? - ioserror creating process - c ++WiX: .Net 3.5 Prerequisite - installerWhy is the eclipse interrupted when the .project file is hidden? - debuggingIs there a good way to automatically generate javascript client code from a server side python server - javascriptBinary search for string array C ++ - c ++All Articles