IronRuby.Builtins.RubyModule.TryRemoveConstant C# (CSharp) Метод

TryRemoveConstant() публичный Метод

public TryRemoveConstant ( string name, object &value ) : bool
name string
value object
Результат bool
        public bool TryRemoveConstant(string/*!*/ name, out object value) {
            using (Context.ClassHierarchyLocker()) {
                return TryRemoveConstantNoLock(name, out value);
            }
        }

Usage Example

Пример #1
0
 public static object RemoveConstant(RubyModule/*!*/ self, [DefaultProtocol, NotNull]string/*!*/ constantName) {
     object value;
     if (!self.TryRemoveConstant(constantName, out value)) {
         self.Context.CheckConstantName(constantName);
         throw RubyExceptions.CreateNameError(String.Format("constant {0}::{1} not defined", self.Name, constantName));
     }
     return value;
 }
All Usage Examples Of IronRuby.Builtins.RubyModule::TryRemoveConstant
RubyModule