locked
check if navigation parameter is null or not RRS feed

  • Question

  • Peace Upon you 
    i am developing windows store (8.1) app
    i am trying to check if the navigation parameter null 

    i wrote 

     protected override void OnNavigatedTo(NavigationEventArgs e)
            {
               navigationHelper.OnNavigatedTo(e);
              if(!string.IsNullOrWhiteSpace(e.Parameter.ToString()) && e.Parameter.ToString()!= null)
                {
                    
                }
                else
                {
                   
                }
            }

    But there is an exception 

    An exception of type 'System.NullReferenceException'




    • Edited by BeginnerDev Thursday, December 19, 2013 2:35 PM
    Thursday, December 19, 2013 2:32 PM

Answers

All replies