rhinocommon
rhinocommon copied to clipboard
Settings.GetStringList not returning default value when no key is found
From Menno on plug-ins newsgroup
If I run the code below, the returned value is null. I expected it to be an empty array.
protected override Result RunCommand(RhinoDoc doc, RunMode mode) { String[] defaultValue = new string[0]; String[] result = Settings.GetStringList("NO_KEY", defaultValue); if (null == result) RhinoApp.WriteLine("Result is null"); //unexpected else { RhinoApp.WriteLine("Result length: {0}",result.Length); // expected output length => 0 } return Result.Success; }