I'm trying to access the variables of a superclass from a library. I'm currently using ImageListView, but I can't get the customization I need from the class ImageListViewItem. I looked at the source code from Github for ImageListViewItem, and I thought I would be able to extend the class and add another constructor like this:
class CustomizableImageListViewItem : ImageListViewItem
{
public CustomizableImageListViewItem(Image image, string fakePath, string name)
{
mZOrder = 0;
Guid = Guid.NewGuid();
ImageListView = null;
and there's about 15 more variables
This is part of the library I am trying to extend
public class ImageListViewItem : ICloneable
{
#region Member Variables
private int mZOrder;
private string mText;
private Guid mGuid;
internal ImageListView mImageListView;
and like the previous example theres a lot more of these, I made sure to include the ones I was trying to use before
I get errors about how most of the variables don't exist in the current context. Why is this and is there any way to fix it?
Aucun commentaire:
Enregistrer un commentaire