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 ?

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;

commented: good post +1

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.