/// <summary> /// Serializes the given value by calling .ToString(). If the value is null, the key is removed. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="name"></param> /// <param name="val"></param> /// <returns></returns> public TK SetAsString <T>(string name, T val) where T : class { return((TK)NameValueCollectionExtensions.SetAsString(this, name, val)); }