Anyone know how to make this function work?
This is the function that i made a while back in VB.NET(Works) that writes to an RTB (rich Text Box).
VB Code:
Public Sub AddChat(ByVal ParamArray aT() As Object) Dim i As Integer With Chat .SelectionStart = .Text.Length .SelectionLength = 0 End With For i = 0 To UBound(aT) Step 2 With Chat .SelectionColor = aT(i) .SelectedText = aT(i + 1) End With Next i With Chat .SelectionLength = 0 .SelectionStart = .Text.Length .SelectedText = Microsoft.VisualBasic.ControlChars.CrLf End With End Sub
to use the function in VB.NET
it would be:
VB Code:
AddChat(Color.White, "Blah Blah Blah")
How would this look in C#?




Reply With Quote