简体   繁体   中英

C# How can I read a MultiString from the registry

I'm currently reading string keys from the registry. I can pull the values from strings and Expanded strings just fine. But once in a while there is a MultiString that does not return the string. Instead, I see "System.String[]" returning instead of the actual string.

Do I have to convert this multistring to a string somehow? Or is there an easier way to read the actual multistring.

Depending on from what you need you should convert it. If you want to store the values as strings, you can convert it using code like this.

string sep = ",";
string result = String.Join(sep, stringArr);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM