Works the same as GetProperty()
. but while that method returns a fixed up FoxPro friendly value, this method tries to return the raw result value directly as a .NET type.
You can also prevent the instance type from being fixed up via the llNoInstanceFixup
parameter.
This method is unsafe and may result in errors if result types are invalid for use in FoxPro which result in Function argument value, type or count is invalid errors.
Use this method in scenarios where a type may be fixed up normally by returning a wrapper object like ComValue
or ComArray
or for types that have multiple representations like char
(return string vs. number) and Guid
(returns string vs. binary guid) for example.
Slightly Faster but make sure you actually need it!
If you know your type is 'safe' to convert, this method can be slightly faster than GetProperty()
as it bypasses the inbound and outgoing type checking.
However, in most cases where this applies you can also directly access the underlying property on the instance without GetProperty()
which should always be your first choice for performance and readability.
o.wwDotNetBridge.GetPropertyRaw(loInstance,lcProperty,llNoInstanceFixup)
Return Value
Value from the property - invalid properties or invalid type returns will throw FoxPro errors.
Parameters
loInstance
The .NET instance on which to retrieve the property from.
lcProperty
The name of the property to retrieve
llNoInstanceFixup
Optional - if .T. bypasses any type fixups on the loInstance
parameter.
See also:
Class wwDotNetBridge© West Wind Technologies, 1996-2024 • Updated: 04/17/24
Comment or report problem with topic