Hi
What is difference between Mid function and Mid Statement ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted May 30, 2012, 10:47 AM
Chintan RathodPosted May 30, 2012, 10:37 AM
Mid function returns the characters while the Mid statement replaces the characters.
Example,
Sub Main()
Dim testString = "TestingStringHere"
Mid(testString, 5) = "..Bore.." ' it is Mid statement
Console.WriteLine(testString) ' returns Test..Bore..gHere - its replacing string
Dim midstring As String = "TestingStringHere"
midstring = Mid(midstring, 8, 6) ' it is Mid function
Console.WriteLine(midstring) ' returns string - its just extracting string
End Sub
Thanks & Regards
-----------------
Chintan Rathod