AnsweredAssumed Answered

How to write list of strings to an attribute of string array datatype through AF SDK

Question asked by Doddabasappa Champion on Feb 27, 2015
Latest reply on Feb 27, 2015 by Ian.Gore

I want to store a list of strings to an attribute of data type string array.I tried the following:

 

List<string> list=new List<string>(new string[]
{
"nile",
"amazon", 
"yangtze", 
"mississippi",
"yellow"
});


AFValue val = new AFValue();
val.Value =list;


myElement.Attributes["myAttribute"].SetValue(val);


this code shows the following error:

Cannot convert 'System.Collections.Generic.List`1[System.String]' to type String.


Can any one please help me with it.

Outcomes