- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Menu Scripts - Null String
Thu 23 Jan 2020 - 8:56
Within the Menu Scripts, I need to use 4 strings and I declare them right at the start, however, if I decare a string that returns a Null value whilst the Script reports no errors, the outcome in Word or Oyez is always ....Not found. How do youset a IF statement to check if there is a null value and thenrunset the string?
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Menu Scripts - Null String
Thu 23 Jan 2020 - 8:56
You can declare the string variable as empty to begin with then check it with string.IsNullOrEmpty(string) string name = string.Empty; if (string.IsNullOrEmpty(name)) { name = “test”; ... ... }
Permissions in this forum:
You cannot reply to topics in this forum