marclile Posted May 27, 2003 Posted May 27, 2003 does anyone know how to do the following in vb.net: Private Type ID3Tag Tag As String * 3 Title As String * 30 Artist As String * 30 Album As String * 30 Year As String * 4 Comment As String * 28 End Type i know that you make is a structure: Private Structure ID3Tag Public Tag As String Public Title As String Public Artist As String Public Album As String Public Year As String Public Comment As String End Structure but how do you specify the lenth of the properties? thanks... Quote
ashrobo Posted May 28, 2003 Posted May 28, 2003 quoted from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconstringlength.asp In Visual Basic .NET, you cannot declare a string to have a fixed length unless you use the VBFixedStringAttribute Class attribute in the declaration. You declare a string without a length. When your code assigns a value to the string, the length of the value determines the length of the string, as in the following example: Dim Name As String ' ... Name = "Name is now 30 characters long" ' Length can be changed later. Quote
marclile Posted May 28, 2003 Author Posted May 28, 2003 thank you... the VBFixedStringAttribute is just what i was looking for. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.