Hi all,
I have the following code sample:
I thought this would fix the string to 8 characters regardless of what I set strTest to but its not. So I'm expecting an empty string (like above) to be 8 characters; or if I set strTest to "test" I'm expecting the output to be test with four trailing spaces. Or if I set it greater than 8 characters it should throw an exception.Code:Module Module1 <VBFixedString(8)> Dim strTest As String = "" Sub Main() Console.Write(strTest) End Sub End Module
Am I using the above in the proper context or should I be using something else to achieve fixed length strings?
Thanks,
Strick




Reply With Quote