none
small basic features in visual basic RRS feed

Answers

  • 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#

    OR

    Imports Microsoft.SmallBasic.Library        ' VB.NET

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

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

    OR

    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
    Answerer