Results 1 to 3 of 3

Thread: Equivalent of VB string declaration...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255

    Equivalent of VB string declaration...

    I am familiar with declaring string variables and such. However I've got this one problem, and it comes down to the need for an exactly equivalent C# statement to this:

    VB Code:
    1. Dim sString As String * 30

    I'm not too sure what it does, but it's what I need to do. I've already tried creating a string, length of 30, containing white space but what I think it wants is a string, length 30, containing nothing at all, not even white spaces.
    Not at all related to sheep...

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Fixed length strings are not supported anymore.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255
    Ah bollocks! OK, here's the exact content (in C#), you're moderator on .NET so you're probably a god when it comes to it:

    VB Code:
    1. public static string GetNumberOfTracks(string Alias)
    2. {
    3. string sResult = new string(' ', 30);
    4. mciSendString("status " + Alias + " number of tracks wait", sResult, 30, null);
    5. return sResult;
    6. }

    So you don't have to look it up:
    Here's the article on MSDN...

    The function definitely works because I'm using it for lots of other working stuff, I just can't get it to return things...

    Any help is *greatly* appreciated
    Not at all related to sheep...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width