public NSRect DecodeRectForKey(string keyName) { NSRect nsRect = new NSRect(); XElement xElm = _classDict.Find( i => (string)i.Attribute("key") == keyName); if (xElm != null) { nsRect = (NSRect)(NSString)this.Create(xElm); } return nsRect; }