c# - The call between InitializeComponent(); is ambiguous? -


my error is:

error 4 call ambiguous between following methods or properties: 'grub2._0.time.initializecomponent()' , 'grub2._0.time.initializecomponent()'

here code:

using system; using system.collections.generic; using system.linq; using system.net; using system.windows; using system.windows.controls; using system.windows.navigation; using microsoft.phone.controls; using microsoft.phone.shell;  namespace grub2._0 {     public partial class time2 : phoneapplicationpage     {         public void time2.()         {             initializecomponent();         }           private void button_click(object sender, routedeventargs e)         {             if (amradiobutton.ischecked == true)                 navigationservice.navigate(new uri("/policemanfood.xaml", urikind.relative));             else if (pmradiobutton.ischecked == false)                 navigationservice.navigate(new uri("/weed.xaml", urikind.relative));             else                 navigationservice.navigate(new uri("/burgerking.xaml", urikind.relative));         }     } } 

try code:

using system; using system.collections.generic; using system.linq; using system.net; using system.windows; using system.windows.controls; using system.windows.navigation; using microsoft.phone.controls; using microsoft.phone.shell;  namespace grub2._0 {     public partial class time2 : phoneapplicationpage     {         public time2()         {             initializecomponent();         }          private void button_click(object sender, routedeventargs e)         {             if (amradiobutton.ischecked == true)                 navigationservice.navigate(new uri("/policemanfood.xaml", urikind.relative));             else if (pmradiobutton.ischecked == false)                 navigationservice.navigate(new uri("/weed.xaml", urikind.relative));             else                 navigationservice.navigate(new uri("/burgerking.xaml", urikind.relative));         }     } } 

removed void keyword , period after time2 on constructor.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -