Created class in C # does not access methods and properties.
-
Monday, May 28, 2012 4:16 PMGood afternoon.
I created some classes in C # and includes a namespace. Until a day ago, could access these classes and their methods normally. Today, again trying to instantiate one of these classes, their properties and will not appear when I try to run any page of the website, it gives me the following error: 'SubCategory' does not contain a definition for 'ListarRptSubcategoria' and the extension method 'ListarRptSubcategoria' Accepting the first argument of type 'SubCategory' could be found (are you missing a using Directive or an assembly reference?).
I checked the target framework and is correctly set to. Net Framework 4.0. Does anyone know what might be happening?
All Replies
-
Monday, May 28, 2012 6:15 PMdoes your classes have the same namespace? if not reference the namespace by making use of the using statement. you can provide us with some sample code.
Good is not good enough when best is expected !!!
-
Tuesday, May 29, 2012 3:08 AMPlease provide the sample code with access modifier of your classes
With Thanks and Regards Sambath Raj.C
-
Tuesday, May 29, 2012 6:04 AM
Hi Mister Morpheus,
I think you forgot to decorate your class and its properties with public access modifier.
please do it and verify again.
Hope this will help you...
Sai Kumar K (MCP)
Blog: Sai's Stuff.
WebSite: SantoshTechnologies. -
Tuesday, May 29, 2012 6:19 AM
Is 'ListarRptSubcategoria' public? If not make it public and then try.
Please mark this post as answer if it solved your problem. Happy Programming!
-
Tuesday, May 29, 2012 9:45 AM
Then try to full qualify the classes you want using the full namespace names and see what happens.
in fact the intelisence should show it then,
Success
Cor

