本文介绍了UserControl和实体出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题是我想像Property
一样在UserConcol
中使用此Entity
;我对List
有问题.有关信息,我将[Serializable]
放在LienNoeud List
上.
这是我的实体:
The problem is that I want to use this Entity
in UserConcol
like Property
; I have a problem with List
. For information, I put [Serializable]
on LienNoeud List
.
This is my entity:
[Serializable]
public class NoeudEntity
{
private RectangleNode m_Noeud = new RectangleNode();
private String m_Nom;
private String m_NoeudID;
private List<LienEntity> m_LienNoeud;
private EEtat m_Etat = new EEtat();
public NoeudEntity()
{
m_LienNoeud = new List<LienEntity>();
}
public RectangleNode Noeud
{
get { return m_Noeud; }
set { m_Noeud = value; }
}
public EEtat Etat
{
get { return m_Etat; }
set { m_Etat = value; }
}
public List<LienEntity> LienNoeud
{
get { return m_LienNoeud; }
set { m_LienNoeud = value; }
}
public String Nom
{
get { return m_Nom;}
set { m_Nom = value;}
}
public String NoeudID
{
set { m_NoeudID = value; }
get { return m_NoeudID; }
}
}
这是我的UserControl
中的财产:
It is my Property in my UserControl
:
public NoeudEntity Noeud
{
set { m_Noeud = value; }
get { return m_Noeud; }
}
[我在这里移动了您的虚假答案,而不是简单地将其删除.]
大家好,
我回过头来解决我的问题,因为我找不到答案,但我认为
来自我的Entity
中的List
(它是[Serializable]
).错误是:
[I moved your fake answer here instead of simply deleting it.]
Hi guys,
I come back on my problem because I''m not finding the answer but I think
that came from the List
in my Entity
(it is [Serializable]
). The error is:
Object of type ''System.Collections.Generic.List`1[LienEntity]''
cannot be converted to type
''System.Collections.Generic.List`1[LienEntity]''.
我需要你的帮助
谢谢
jerem
I need your help
Thanks
jerem
推荐答案
这篇关于UserControl和实体出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!