Description Usage Arguments Examples
Sets the value of a field or property of an object or class
1 |
objOrType |
a CLR object, or type name, possibly namespace and assembly qualified type name, e.g. 'My.Namespace.MyClass,MyAssemblyName'. |
name |
the name of a field/property of the object |
value |
the value to set the field with |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(rClr)
testClassName <- "Rclr.TestObject";
testObj <- clrNew(testClassName)
clrReflect(testObj)
clrSet(testObj, 'FieldIntegerOne', 42)
clrSet(testClassName, 'StaticPropertyIntegerOne', 42)
# Using 'good old' Windows forms to say hello:
clrLoadAssembly("System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089")
f <- clrNew('System.Windows.Forms.Form')
clrSet(f, 'Text', "Hello from '.NET'")
clrCall(f, 'Show')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.