Table of Contents

C# Concepts

... and how to express them in VL.

foo++

How to translate an expression like the following to VL:

var foo = 1;
foo++;

First we need to agree that the above is only a shortcut to writing:

var foo = 1;
foo = foo + 1;

Then the below patch should be read as: The lower foo pad corresponds to the left side of the assignment (foo =) and the upper foo pad corresponds to the initialized variable foo (var foo = 1). So:

foo (lower pad) = foo (upper pad) + 1;

.Note how the link from the IOBox to the foo pad is white, meaning it is assigned to the constructor

.Shortcut for + 1: Use the Inc node

Nullable

When referencing an external library, you may encounter input or output pins of type Nullable. To deal with them you need to reference the System.Runtime assembly from the GAC.

This gives you access to the nodes HasValue and Value to read from nullable outputs. To set a value to an input that requires a Nullable, it is enough to put a CastAs node in between the value and the nullable input.

Note

CastAs only shows up with the Advanced aspect enabled in the nodebrowser.

Variables

Lambda

Observable

See Reactive.

Task

Enumerator

When referencing an external library, you may encounter collection types, that do not inherit from Sequence and as such cannot simply be used with VL's ForEach loop.

Most likely those collections will still support an Enumerator. Here is how you can deal with an enumerator in VL:

MoveNext, Current