small basic features in visual basic RRS feed

  • Question

  •  How do you use the small basic text file features in visual basic express?
    Friday, May 4, 2018 1:39 AM


  • You mean The SB 'File' and 'Text' classes?

    1.) Add a reference to
    C:\Program Files (x86)\Microsoft\Small Basic\SmallBasicLibrary.dll  resp. C:\Program Files\...

    2.) On top add a using statement

    using Microsoft.SmallBasic.Library;        // C#


    Imports Microsoft.SmallBasic.Library        ' VB.NET

    3.) Use it in your .NET class, like

    Microsoft.SmallBasic.Library.File.METHOD(str1, ...)


    Text.METHOD(str1, .. )

    Arguments and Return values under SB are of type 'Primitive' which may be Strings, Integer, (no other variable types under 'File', 'Text' class, i think).
    Remember that SB Arrays (eg. return values from File.GetFiles or File.GetDirectories) are Strings.

    Maybe you want to take a look at LitDev's Guide to writing extensions

    Download the zip and read the 2 Pdfs (VB and C#) as an example how to use SBLib.dll

    Sunday, May 6, 2018 12:40 PM