visual studio 2010 - how to use tag variable in c# -



visual studio 2010 - how to use tag variable in c# -

i have type object tag in cshapelayeritem.tag

here code

public class cshapelayeritem { public cshape shape; public long id; object _tag = null; public object tag { { homecoming _tag; } set { _tag = value; } } public datarow row; public cshapelayer cshapelayer = null; public cshapelayeritem() { } }

here cshapelayeritem , tag value

when seek cshapelayeritem.tag. there no link skenarioid

the question how skenarioid value in tag , show in textbox txtskenarioid.text? im new in c#

the tag property object, object, you'll need cast whatever type stored in there before can access properties on it.

assuming you've got instance of centityskenario, cast (i'm assuming skenarioid property accessible):

txtskenarioid.text = ((centityskenario)cshapelayeritem.tag).skenarioid.tostring();

c# visual-studio-2010

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

java - Parsing XML, skip certain tags -

c# - ASP.NET MVC Sequence contains no matching element -