public void SampleMethod()
{
// Body of the method.
}
What is the Void in c#?
                            Asked 
                            
                                6 years ago
                            
                        
                        
                            Viewed 
                            918 times
                        
                        
                    What is the Void in c#?
1 Answer
                                    The void keyword is used as a return type for a method. When we declare or define a method with the void keyword, it means that the method cannot return any value. The void keyword cannot be used in a parameterized method. A method with no parameters or return value is declared below: