@GetSelectedIntItemString()
@code { private IEnumerable NullableIntItems { get; set; } = new SelectedItem[] { new SelectedItem() { Text = "Item 1", Value = "" }, new SelectedItem() { Text = "Item 2", Value = "2" }, new SelectedItem() { Text = "Item 3", Value = "3" } }; private int? SelectedIntItem = null; private string GetSelectedIntItemString() { return SelectedIntItem.HasValue ? SelectedIntItem.Value.ToString() : "null"; } }