var temp = toCheck.GetData(DataFormats.FileDrop);
I have the code above in my program. toCheck is an IDataObjecct containing a file(image to be specific) path.
When I debug, I see the value stored under as such:
temp -> {string[1]}
[0] -> "C:\....rest of path"
Everything is correct but when I try to access the string inside, I cannot. If I use the toString() method it returns System.String[] but not the filepath.
Any suggestions on how I can retrieve the filepath inside of the variable?
temp
is an array of strings, that is why you are getting that. If you want to get the first string of the array then:That should do
Also you can check if the string[] has any string with:
where
myString
is a variable of typestring