public bool Sendes(Postmetode posttype) { switch (posttype) { case Postmetode.Fysisk: return(PostInfo.GetType() == typeof(FysiskPostInfo)); case Postmetode.Digital: return(PostInfo.GetType() == typeof(DigitalPostInfo)); default: throw new ArgumentOutOfRangeException(nameof(posttype), posttype, "Posttype er ikke gyldig."); } }
public bool Sendes(Postmetode posttype) { switch (posttype) { case Postmetode.Fysisk: return PostInfo.GetType() == typeof (FysiskPostInfo); case Postmetode.Digital: return PostInfo.GetType() == typeof(DigitalPostInfo); default: throw new ArgumentOutOfRangeException("posttype", posttype, "Posttype er ikke gyldig."); } }