optional parameter get request csharp

Code Example - optional parameter get request csharp

                
                        public string GetFindBooks(string author="", string title="", string isbn="", string  somethingelse="", DateTime? date= null) 
{
    // ...
}
                    
                
 

csharp optional parameters

                        
                                // Using Optional Attribute
private void SomeMethod([Optional] string param)
{
    ...
}

// Using Default Values
private void SomeMethod(string param = null)
{
    ...
}
                            
                        
 

Related code examples