0

Hello guys. Let's say i have a unidimensional array:
string[] names = {"John","Merlin","XMan","Kelvin",...,"Flash"};

How can i see how much elements i have ? I tryed with sizeof(names) but it doesn't works ...

Next Question:
I have a RichTextBox, and i select a text ... i change it's color, but when i enter in program, my selected text is selected ( it's background color is a dark-blue ) ... How can i set the cursor of RichTextBox at x:1, y:1 ?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by charqus
1

You use the Length property to get the number of elements in an array: names.Length To set the cursor at a specific position, use the SelectionStart property: rtb1.SelectionStart = 0;

Votes + Comments
good post
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.