Hello,
I'm trying to retrieve odd values in a List of strings and convert them into a Guid Object. Here is what i came up with
Guid oGuid = new Guid();
string objectName = string.Empty;
for (int i = 0; i < lst_objectName_Guid.Count; i++)
{
if (i % 2 != 0) //The GUID values are in the Odd-Numbered Indexses
{
oGuid = new Guid(lst_objectName_Guid[i]); //Convert the GUID Values from string to Guid
}
else
{
objectName = lst_objectName_Guid[i]; //Assign the objectName Values into a string variable
}
Console.WriteLine(objectName);
Console.WriteLine(oGuid);
The problem is now that always it displays a set of (0) Zero's as the first Guid is retrieved and I get a "Object does not exist" when I check if the Object is locked or not.(I get this on every even object that is tested)
Can anybody tell me what's happening and why? and if there is a better way to retrieve odd_numbered indexes and store them as GUID
I'm pretty sure that the odd indexes hold the Guid Values as strings. I printed out the List and made sure of that
Thanks