المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : KeyValuePair from reference dll



C# Programming
01-03-2013, 04:50 PM
Hello.
iam trying to read a KeyValuePair but it seems that iam doing soemthing wrong here, iam including a small part of the code where iam trying to read the value and also a capture from the debug, the debug shows me in "Locals" the info that i want to read.

var dataSourceName = ( from entry in entityParams where entry is KeyValuePair<span class="code-keyword"string/span, string> && entry != null && ((KeyValuePair<span class="code-keyword"string/span, string>)entry).Key.Equals("DataSourceName") select ((KeyValuePair<span class="code-keyword"string/span, string>)entry).Value).FirstOrDefault();

I did not find a way to upload and include a image in this post, so i added it external instead.

Link to image (http://kramericasoftware.se/entityParams.png)

In this debug case its the value "ps3" that i need.
I have added the .dll switchking.common to my references and also using SwitchKing.Common.Entities;

But now i need help what i need to do more to have access to the value.