Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# version of VFP PEMSTATUS()
Message
From
19/01/2010 15:54:07
John Baird
Coatesville, Pennsylvania, United States
 
 
To
19/01/2010 12:35:52
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01444636
Message ID:
01444818
Views:
51
>>>Look at Bonnie's article in April 2007 of Universal Thread Magazine:
>>>
>>>http://www.levelextreme.com/ViewPageArticle.aspx?Session=352B65654B536B4830706B3D204F455A6670646F5559727967654E5A6F6B55635076513D3D
>>
>>Looks like Bonnie omitted a parameter:
if (PemStatus(oObject, "SetFocusAtAdd") && _
:-{

>
>Oops, yep, looks like it. My bad.
>
>The underscore in that line, which is a continuation character in VB but not valid in C#, was added to what I originally submitted (this was C# code) ... the magazine editor must have done that.
>
>~~Bonnie


You can also use linQ to see if the property exists and to return the properties value.
if( MyClass.GetType().GetProperty (propName) != null)
{
     object propValue = MyClass.GetType().GetProperty(propName).GetValue(MyClass, new object[]{});
}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform