C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




error CS1006


Posted Date: 04 Jun 2008    Resource Type: Errors and Solutions    Category: General
Author: Debasmit SamalMember Level: Gold    
Rating: Points: 5



An error (CS1006)comes when trying to declare a method without specifying a return type?

If we leave the return type on a method declaration, the compiler thinks you are trying to declare a constructor.
So if you are trying to declare a method that returns nothing, use void.
an example is:
// This results in a CS1006 error public static staticMethod (mainStatic obj)
// This will work as wanted public static void staticMethod (mainStatic obj)




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: DllImport not working.
Previous Resource: Variable declaration
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use