c# - Creating nullable class -


how create nullable (?) class in c#? like:

public class hello1 {   public int property1 { get; set; } }  public class hello2 {  public hello1? property2 { get; set; } //hello1 should work when has "?" } 

i wanna make hello1 class take form "hello1?" if needed.

you don't need create nullable type reference types. they're nullable. need value types int, bool, decimal, etc...


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -