Using a union to retrieve the RGB components of a color
In VB.NET you can create what in C is called a union, i.e. a particular structure where you can access the same memory with different names. Here’s how you declare
In VB.NET you can create what in C is called a union, i.e. a particular structure where you can access the same memory with different names. Here’s how you declare
As explained in the tip about the ARGBColor structure (look at the end of this tip for the link), we can define a structure and have its fields that point
‘ A generic routine that inserts an element in any type of array.’ Example: inserting an entry of value 5 between the 1st and 2nd entry of the ‘ array
‘ A reusable function that merges two ArrayList objects’ Example:’ Dim al As New ArrayList()’ al.Add(“Jack”)’ al.Add(“Mary”)’ val.Add(“Bob”)’ al.Add(“Tom”)’ ‘ Dim al2 As New ArrayList()’ al2.Add(“Frank”)’ al2.Add(“Lee”)’ al2.Add(“Nick”)’ ‘ al
‘ A generic routine that deletes an element in any type of array.’ Example: deleting the 2nd element of the array arr’ ArrayDeleteElement(arr, 1) Sub ArrayDeleteElement(ByVal arr As Array, ByVal