Aisha Srivastava

Aisha Srivastava

  • NA
  • 230
  • 28.5k

Error Can't convrt strng to systm.collectn.generic.dictnry<>

May 13 2015 5:28 AM
Error Can't convrt string to system.collection.generic.dictionary<string,string>
 code:
HtmlElement paragraph = this.editorWebBrowser.Document.GetElementById(paragraphId);
 Dictionary<string, string> styleDictionary = GetStyleDictionary(paragraph.Style);
string currentMargin = paragraph.Style.ToString();
currentMargin = Regex.Match(currentMargin, @"-?\d+").Value;
int numericMargin = Int32.Parse(currentMargin);
styleDictionary = (numericMargin + 15).ToString() + "px";
 
 
****************************************************** 
Basically i have to add value to my existing style value by 15;
ie:
Margin-left:15px
then
get that style
and add 15 px more: Margin-left:30px so on...
 

Answers (2)