Server.Commands.Properties.SetValue C# (CSharp) Méthode

SetValue() public static méthode

public static SetValue ( Mobile from, object o, string name, string value ) : string
from Mobile
o object
name string
value string
Résultat string
		public static string SetValue( Mobile from, object o, string name, string value )
		{
			object logObject = o;

			string failReason = "";
			PropertyInfo p = GetPropertyInfo( from, ref o, name, PropertyAccess.Write, ref failReason );

			if ( p == null )
				return failReason;

			return InternalSetValue( from, logObject, o, p, name, value, true );
		}

Usage Example

        public override void Execute(CommandEventArgs e, object obj)
        {
            string result = Properties.SetValue(e.Mobile, obj, m_Name, m_Value);

            if (result == "Property has been set.")
            {
                AddResponse(result);
            }
            else
            {
                LogFailure(result);
            }
        }
All Usage Examples Of Server.Commands.Properties::SetValue