You are probably looking at 2.x samples where String2D has been removed and replaced with Text.
String2D is for 1.x, and you use the Text property to change what it displays.
Fortunately the interfaces are very similar. You should be able to simply replace anything declared as Text with String2D without changing any of the other code. An example for each version:
SFML.NET 1.x
Imports SFML
Imports SFML.Window
Imports SFML.Graphics
Public Sub Main()
Dim Output As New RenderWindow(New VideoMode(640, 480), "SFML.NET Text Example")
Dim ExampleText As New String2D("", New Font("myfont.tff"))
ExampleText.Position = New Vector2(5, 5)
Do While (true)
Output.Clear(New SFML.Graphics.Color(0,128,160))
ExampleText.Text= String.Format("Hello, world! {0}", DateTime.Now.ToString("hh:MM.ss"))
Output.Draw(ExampleText)
Output.Display()
End While
End Sub
SFML.NET 2.x
Imports SFML
Imports SFML.Window
Imports SFML.Graphics
Public Sub Main()
Dim Output As New RenderWindow(New VideoMode(640, 480), "SFML.NET Text Example")
Dim ExampleText As New Text("", New Font("myfont.tff"))
ExampleText .Position = New Vector2(5, 5)
Do While (true)
Output.Clear(New SFML.Graphics.Color(0,128,160))
ExampleText.DisplayedString = String.Format("Hello, world! {0}", DateTime.Now.ToString("hh:MM.ss"))
Output.Draw(ExampleText )
Output.Display()
End While
End Sub
Obviously a very stripped back example but hopefully demonstrates just how simple the difference is.