I'm not sure how I would make an enumeration with fault tolerance for something like below. Would an enumeration be faster?
This is a truncated version. I have over 25 conversions for strings of various types:
vb.net Code:
Public Function DoCvsn(ByVal TheInput As String, ByVal TheLength As Integer, ByVal CvsnCode As Integer) As String Dim TheOutput As String = "" Select Case CvsnCode Case 0 TheOutput = TheInput Case 41 TheOutput = TheInput.Substring(0, 2) + "/" + TheInput.Substring(2, 2) + "/" + TheInput.Substring(4, 4) Case Else TheOutput = TheInput End Case End Function




Reply With Quote