This is a discussion on error (CS1006) when trying to declare a method without specifying a return type within the C# Programming forums, part of the Software Development category; Hui Guys can anybody tell me Why do I get an error (CS1006) when trying to declare a method without ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hui Guys can anybody tell me Why do I get an error (CS1006) when trying to declare a method without specifying a return type? |
| Sponsored Links |
| |||
| Dear Vignesh, Have you tried to declare a method that returns nothing, use void. The following lines will get you clear idea: public static staticMethod (mainStatic obj) // This will result in a CS1006 error public static void staticMethod (mainStatic obj) // This will work correctly |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I return two values to a form? | S.Vinothkumar | PHP Programming | 5 | 10-16-2007 07:29 AM |
| What is Value type and reference type in .Net? | anbuchezhians | VB.NET Programming | 2 | 08-21-2007 10:42 PM |
| void return type | anbuchezhians | Java Programming | 1 | 07-25-2007 05:55 AM |
| declare an array of N pointers to functions returning ? | sundarraja | C and C++ Programming | 0 | 07-25-2007 04:58 AM |
| What's the Reason for getHeight() method not return the correct value in Game canvas? | mobilegeek | Mobile Software Development | 1 | 07-19-2007 01:06 AM |