background preloader

VB.NET

Facebook Twitter

Persistent data avalability within a VB component. Windows.forms. VB.NET and C# Comparison. VbCrLf, vbCr, vbLf, vbNewLine vbNullString vbTab vbBack vbFormFeed vbVerticalTab "" Dim school As String = "Harding" & vbTab school = school & "University" school &= "University" Dim letter As Char = school.Chars(0) letter = "Z"c letter = Convert.ToChar(65) letter = Chr(65) Dim word() As Char = school.ToCharArray() Dim filename As String = "c:\temp\x.dat" Dim mascot As String = "Bisons" If (mascot = "Bisons") Then If (mascot.Equals("Bisons")) Then If (mascot.ToUpper().Equals("BISONS")) Then If (mascot.CompareTo("Bisons") = 0) Then If ("John 3:16" Like "Jo[Hh]?

S = mascot.Substring(2, 3)) s = Mid("testing", 2, 3) s = mascot.Replace("sons", "nomial")) Dim names As String = "Michael,Dwight,Jim,Pam" Dim parts() As String = names.Split(",".ToCharArray()) Dim dt As New DateTime(1973, 10, 12) Dim s As String = "My birthday: " & dt.ToString("MMM dd, yyyy") Dim x As Integer = 2 Dim y As String = x.ToString() Dim x As Integer = Convert.ToInt32("-5") \r \n \t \\ \"

AADRL Term 2 – Class 3: Introduction to VB.NET » VITRUALITY. For reference, here are some lecture slides that go through some of the fundamental theory behind object-oriented programming as it relates to VB.NET. It’s primarily aimed at people moving to VB.NET from RhinoScript, but is possibly still a useful reference for anybody else interested in starting out with Visual Basic as well. Download it here: VisualBasic.pdf The main example this week doesn’t use grasshopper at all, instead it is a simple standalone application written in Visual Basic to calculate the areas of different shapes.

Not the most useful tool in the entire universe, but hopefully it does demonstrate how concepts such as classes, inheritance and polymorphism can be implemented in VB.NET. This example was created using Visual Basic Express 2008; to recreate the form create a new windows form project and set up a form with Text Boxes called ‘WidthBox’, ‘HeightBox’ and ‘OutputBox’, a ComboBox called ‘TypeCombo’ and a Button called ‘CalculateButton’. ExampleAreaCalculator.zip. AADRL Term 2 – Class 3/4: VB.NET in Grasshopper » VITRUALITY.

Four examples this time around, showing how to take all that sexy VB.NET stuff we covered last time and stick it in grasshopper. First up, a super-simple example of how you can write your own version of the standard line component. Using the code: You can download the example here: (Right click, save as…) That example will follow the same basic rules on data-matching as most other components; namely if you input a list or a tree it will be run once matching the first item in both lists, again with the second and so on. This script will take two lists of points and draw a zig-zag between them. Aaaaand you can download it here: (Right click, save as…) Now things get a little more interesting. So, the next example uses this principle to create a fractal branching structure.

Which were made with this script: