D
deko
In an attempt to index my imageList, I do this:
private enum NodeImage
{
imgA, imgA, imgC
}
Then I try this:
private TreeNode nodeA = new TreeNode("NODE A", NodeImage.imgA,
NodeImage.imgA);
But the new TreeNode method wants ints, so that will not compile.
Do I have to do this:
private TreeNode nodeA = new TreeNode("NODE A", (int)NodeImage.imgA,
(int)NodeImage.imgA);
Why don't I get the int index of the enum by default?
Thanks in advance.
private enum NodeImage
{
imgA, imgA, imgC
}
Then I try this:
private TreeNode nodeA = new TreeNode("NODE A", NodeImage.imgA,
NodeImage.imgA);
But the new TreeNode method wants ints, so that will not compile.
Do I have to do this:
private TreeNode nodeA = new TreeNode("NODE A", (int)NodeImage.imgA,
(int)NodeImage.imgA);
Why don't I get the int index of the enum by default?
Thanks in advance.