How can I set Field Value by index?

Posts   
 
    
JonNeil
User
Posts: 1
Joined: 13-Nov-2006
# Posted on: 13-Nov-2006 08:43:29   

Hi there,

heres an example :

ContactEntity contact = new ContactEntity(); 

contact.Name = "Jon"; //works


contact.Fields[1] = "Jon"; //Does not work - parsing error : Cannot convert type 'string' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField2'

Thanks in advance

Jon

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 13-Nov-2006 09:59:52   

use: contact.SetNewFieldValue(1, "Jon");

Frans Bouma | Lead developer LLBLGen Pro