Here’s the translation of the Go code example to Visual Basic .NET, formatted in Markdown suitable for Hugo:
Our first program demonstrates the generation of random numbers. Here’s the full source code:
To run the program, save the code in a file with a .vb extension and compile it using the Visual Basic compiler, then run the resulting executable.
Some of the generated numbers may be different when you run the sample.
Note that Visual Basic .NET uses the Random class from the System namespace for random number generation. Unlike the Go example, which uses a PCG (Permuted Congruential Generator), VB.NET’s Random class typically uses a different algorithm. However, the basic principle of seeded random number generation remains the same.
See the Random Class documentation for references on other random quantities that Visual Basic .NET can provide.