Colleagues,
Whatever new product MS releases - it's usually quite buggy/fleassy/roachy/whateverUcallit, but it has never happened with Visual Studio that what worked in previous version doesn't wanna work in the next version!
But here it is:
Whereas the VS documentation says:
Here's the link:
Any ideas how to circumvent this VS's discrepancy?
Just in case, here's the function's full code (and note this persisting autoindentation, BTW):
Regards,
Ilya
Whatever new product MS releases - it's usually quite buggy/fleassy/roachy/whateverUcallit, but it has never happened with Visual Studio that what worked in previous version doesn't wanna work in the next version!
But here it is:
Whereas the VS documentation says:
Here's the link:
Any ideas how to circumvent this VS's discrepancy?
Just in case, here's the function's full code (and note this persisting autoindentation, BTW):
Code:
======================================================================================================================
Public Function AddBackSlash(ByVal tsPath As String) As String
'===================================================================================================================================
' Purpose : Ensures the given path string has backslash at the end.
' Description : Checks if the passed parameter's data type match those of the Function's argument; if not – throws error message
' and returns unchanged parameter.
' Checks if it's an empty string, if it is - returns it As-Is.
' Checks if it's only a file name, if it is - returns it As-Is.
' Checks the given parameter-string in case it's full path to a file, cuts off the file name if it is.
' Checks if the given parameter-string has backslash at the end, adds it if it has not.
' Parameters : Path as String - mandatory
' Returns : Path with the backslash at the end, as String.
' Side effects : None.
' Notes : 1. Generic, applies with .NET Framework ver. 1.1, .NET Core 1.0, .NET Standard 1.0 and higher.
' 2. Verbose on errors, silent otherwise.
'===================================================================================================================================
Dim lsMsg As String = "", lsRet As String = "" 'lsPath As String = "",
' Parameter's verification
If VarType(tsPath) <> VariantType.String Then
lsMsg = "Invalid parameter passed: " & Chr(34) & "tsPath" & Chr(34) & " must be of type String!"
MsgBox(lsMsg, MsgBoxStyle.Critical, "Fatal Error: INVALID PARAMETER")
Return lsRet
End If
If String.IsNullOrEmpty(tsPath) Then
Return lsRet
End If
lsRet = System.IO.Path.Join(tsPath, ".").TrimEnd(".")
Return lsRet
End Function
'===================================================================================================================================
Regards,
Ilya