If you want to change the default programming language for InfoPath custom code go to,
File -> Option ->InfoPath Options
Select More Options and choose the Design tab.
Here you can change the custom programming language from VB – C# or vice-versa.
You can also show Notifications for errors in code by selecting the option available in Advanced tab.
Once a project for custom InfoPath gets created, the only way to remove it or change the programming language is to go to Remove Code.
InfoPath Form->Developer->Language->Programming->Remove Code.