String converting | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

String converting

How can I convert a String to an Object[]

15th Aug 2016, 6:08 PM
Jaco Malan
Jaco Malan - avatar
3 Answers
+ 1
Why would you need that?
15th Aug 2016, 8:58 PM
LetSPlaYRagE23
LetSPlaYRagE23 - avatar
0
to convert file name list to a comBobox entry
16th Aug 2016, 4:46 AM
Jaco Malan
Jaco Malan - avatar
0
Remember that in inheritance term the string class is derived from the Object class, so all strings are objects. Take a look at the following generic interface and class: interface IWrapper<T> { void DetEsts(T data); T GetData(); } class Wrapper<T> : IWrapper<T> { private T storedData; void IWrapper<T>.SetData(T date) { this.storedData =data; } T IWrapper<T>.GetData() { return this .storedData; } } The Wrapper<T> class provides a simple wrapper around a specified type. The IWrapper interface defines the SetData method that the Wrapper<T> class implements to store the data and the GetData method that the Wrapper<T> class implements to retrieve the data. I use Visual Studio 2015, therefore in the Design View window you would click the ComboBox control. In the Properties window, expand the Common property category if it's not already expanded. Then, click the eclipse button that appears alongside the Items property. When using Visual Studio 2015 the ComboBox control can display simple elements such as a set of ComboBoxItem controls that display text, but it can also contain more complex elements such as buttons, check boxes, and radio buttons. If you are adding simple ComboBoxItem controls, it is probably easier to type the XAML market by hand, but if you're adding more complex controls, the Object Collection Editor can prove very useful. I have found reading John Sharp books from Microsoft that one should avoid trying to be too clever in a combo box; the best apps are those that provide the most intuitive UIs, and embedding complex controls and a combo box can be confusing to a new user.
19th Nov 2016, 7:18 AM
Gena Beamon
Gena Beamon - avatar