VB 08 String Methods

  • Mark Hay
    Participant

    Hi folks,

    Just wondering, am trying to get my thoughts in order for starting on higher software dev too, but I want the N5/higher to follow on.

    Previously have always used the .NET methods such as .Substring etc.

    Does anyone else use VB08 and if so what do you do? Do you think the SQA would actually care which I use?

    Lucinda
    Participant

    Not exactly sure what you mean and might well be going off on a tangent but

    VB 2008 is VB.net, its just the 2008 release of Visual Studio. The naming of Microsoft development products is very confusing. but since VB6 all VB is VB.net.

    There are three version that are a factor of this:

    The visual studio version
    The language version
    The .net framework version

    Each version of the above has its own functionality:

    visual studio version – changes to editor tools, and refactoring tools in visual studio
    language version – changes to what you can validly write as code and how it will be compiled
    .net versions – changes to features of the run time and the standard set of .net classes and types available for use in compiled code

    substring is a method of string – a .net type. its available in all .net versions and can be used by any language compiled to IL – the language that all “.net” languages compile to (e.g. VB.net ,C#,F#,IronPython etc.).

    See here and check the other versions option near the top of the page:

    http://msdn.microsoft.com/en-us/library/system.string.substring(v=vs.110).aspx

    You can use the MSDN to check anything you are wanting to use to ensure its compatible with the version of .net etc that you are using.

    Lee Murray
    Participant

    Hi Mark,

    I’ll be using string.substring(x, y) in all my teaching. Previously (VB5CCE) I’d use Mid(string, x, y) and Left(string, x) and Right(string, x), but the latter two are no longer available in 2008. Mid still is, so it might be worth me continuing with that for continuity with my previous classes, but I’ll be using .substring for my new classes.

    As for whether the SQA would care, I should hope not. Different languages have different syntax, so I’d reckon they only care about the result – creating a sub string.

    Hope this is what you were looking for.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.