0
String converting
How can I convert a String to an Object[]
3 Respuestas
+ 1
Why would you need that?
0
to convert file name list to a comBobox entry
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.