I have an array of string defined as follows:
string[] items = { "Item 1", "Item 2", "Item 3", "Item 4"};
Then I have a model defined as :
public class ItemModel {
public int Id { get; set; }
public string ItemName { get; set; }
public bool IsItem { get; set; }
}
I have defined a list as :
var listItems = new List<ItemModel>();
I want to add the items from the array items to the list of object of listItems. I want to add the items to ItemName
List<ItemModel>whats theIdandIsItemfor respective item?ItemNameby some logic? or just randomly?