© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
10 replies
SWEETPONY

❔ what is difference between _ and ()?

I have following in constuctor:
var initialize = ReactiveCommand.CreateFromTask( async () =>                     
 {                                                                                
     const string databaseFileName = "log.db";                                    
     var databaseFilePath = Path.Combine( Path.GetTempPath(), databaseFileName ); 
     var database = new SQLiteAsyncConnection(databaseFilePath);                  
                                                                                  
     await database.CreateTableAsync<MqttDelivery>();                             
 } );                                                                             
 initialize.Subscribe();                                                          
 initialize.Execute();                                                            

 var initialize = ReactiveCommand.CreateFromTask( async _ =>                     
 {                                                                                
     const string databaseFileName = "log.db";                                    
     var databaseFilePath = Path.Combine( Path.GetTempPath(), databaseFileName ); 
     var database = new SQLiteAsyncConnection(databaseFilePath);                  
                                                                                  
     await database.CreateTableAsync<MqttDelivery>();                             
 } );                                                                             
 initialize.Subscribe();                                                          
 initialize.Execute();     
var initialize = ReactiveCommand.CreateFromTask( async () =>                     
 {                                                                                
     const string databaseFileName = "log.db";                                    
     var databaseFilePath = Path.Combine( Path.GetTempPath(), databaseFileName ); 
     var database = new SQLiteAsyncConnection(databaseFilePath);                  
                                                                                  
     await database.CreateTableAsync<MqttDelivery>();                             
 } );                                                                             
 initialize.Subscribe();                                                          
 initialize.Execute();                                                            

 var initialize = ReactiveCommand.CreateFromTask( async _ =>                     
 {                                                                                
     const string databaseFileName = "log.db";                                    
     var databaseFilePath = Path.Combine( Path.GetTempPath(), databaseFileName ); 
     var database = new SQLiteAsyncConnection(databaseFilePath);                  
                                                                                  
     await database.CreateTableAsync<MqttDelivery>();                             
 } );                                                                             
 initialize.Subscribe();                                                          
 initialize.Execute();     


the first one will be executed
second one will be skipped

why?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

what is the difference between arrays,vectors and lists?
C#CC# / help
2y ago