Windows Presentation Foundation 4.5 Cookbook 2012
ISBN 978-1-84968-622-8
Creating a dependency property, page 16
Ex:
1 public partial class SimpleControl : UserControl{
2 public SimpleControl(){ InitializeComponent(); }
3 prodp //<-- Define a DependancyProperty Code snippet for a property using DependencyProperty as backing store
}
Following the above reference, I unable to compile the application due to line 3. According to the book, if the cursor is set on top of the prodp (no semicolon) the comment I have added to the line should appear as a tip, however, intellisense in my VSE2013 is reporting it as an problem and the compiler reports:
error CS1519: Invalid token '}' in class, struct, or interface member declaration
which is correct. What is most confusing is that if I add the semicolon at the end of line 3 I get this error msg:
error CS1519: Invalid token ';' in class, struct, or interface member declaration
The book is based on VS2010 and I am using 2013, could this be the problem?
Thanks
Worry is a misuse of imagination :)