/// <include file='doc\NumberFormatInfo.uex' path='docs/doc[@for="NumberFormatInfo.ReadOnly"]/*' />
        public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi)
        {
            if (nfi == null)
            {
                throw new ArgumentNullException("nfi");
            }
            if (nfi.IsReadOnly)
            {
                return(nfi);
            }
            NumberFormatInfo info = (NumberFormatInfo)(nfi.MemberwiseClone());

            info.isReadOnly = true;
            return(info);
        }
Beispiel #2
0
        public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi)
        {
            if (nfi == null)
            {
                throw new ArgumentNullException(nameof(nfi));
            }
            Contract.EndContractBlock();
            if (nfi.IsReadOnly)
            {
                return(nfi);
            }
            NumberFormatInfo info = (NumberFormatInfo)(nfi.MemberwiseClone());

            info.isReadOnly = true;
            return(info);
        }
        public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi)
        {
            if (nfi == null)
            {
                throw new ArgumentNullException("nfi");
            }
            if (nfi.IsReadOnly)
            {
                return(nfi);
            }
            NumberFormatInfo numberFormatInfo = (NumberFormatInfo)nfi.MemberwiseClone();
            int num = 1;

            numberFormatInfo.isReadOnly = num != 0;
            return(numberFormatInfo);
        }
 public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi) {
     if (nfi == null) {
         throw new ArgumentNullException("nfi");
     }
     Contract.EndContractBlock();
     if (nfi.IsReadOnly) {
         return (nfi);
     }
     NumberFormatInfo info = (NumberFormatInfo)(nfi.MemberwiseClone());
     info.isReadOnly = true;
     return info;
 }