Groups | Blog | Home
all groups > dotnet windows forms databinding > may 2008 >

dotnet windows forms databinding : How to make a class binding


Hugo Pereyra
5/7/2008 11:23:02 AM
Hi, i´m programming in C#, and i´ve a simple class Car, and i´d like to make
it able to accept a datasource to fill their properties, Can anybody help me
in how to do it ?
Im working with a datasource, and i´d like to bind the value "pers" from the
datasource, to my class....

Thanks a lot!


public class Car{

public int Id

{

get { return id ; }

set { id = value; }

}

public int pers

{

get { return pers; }

set { pers = value; }

}

}


Marc Gravell
5/9/2008 8:36:16 AM
Normally databinding is used to bind a model (such as classes) to a
user-interface or similar. The Car (or a list of) would *be* the
datasource - it wouldn't accept one.

Can you clarify what you want to do?

AddThis Social Bookmark Button