I am Searching though the contents of a Excel Spreadsheet template at replacing all the variables represented by @Something.
I have all the variables names come up with code, i'm just looking for a way to replace the them in a string.
Example:
My name is @Name
I want it to become:
My name is John.
My Code explained:
I have an array holding a struct which holds:
TagPointer: this is my variable @name, TagValue: this would be the name John
Here i can get the index of where my variable is and i have the original String its Comp. I am just unsure how i can replace the @Something.
int testnum;
if (Comp != "null")
{
if (Comp.IndexOf(ArrayNode[i].TagPointer) != -1)
{
testnum = Comp.IndexOf(ArrayNode[i].TagPointer);
}
}