Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6031541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:11:56+00:00 2026-05-23T05:11:56+00:00

| P.Call(_, mi, [P.Value(value, _); P.PropertyGet(q, propInfo, [])]) -> … How would I use

  • 0
| P.Call(_, mi, [P.Value(value, _); P.PropertyGet(q, propInfo, [])]) -> ...

How would I use the GetValue method, in order to get the value for propInfo?

EDIT

Based on @Stephen Swensen’ suggestion, I’ve tried to do:

| P.Call(_, mi, [P.Value(value, _); P.PropertyGet(q, pi, [])]) ->
    match q.Value with
    | P.PropertyGet(_, pi2, []) -> printfn "%A" <| pi.GetValue(pi2, null)
    | _ -> failwith "fail"

However, it simply throws an exception:

TargetException was unhandled: Object
does not match target type.

The value of pi2 at runtime is: Some({PropertyGet (None, Author r, [])})

EDIT

Bahh… didnt notice that pi2 is static.

The solution is:

| P.Call(_, mi, [P.Value(value, _); P.PropertyGet(q, pi, [])]) ->
    match q.Value with
    | P.PropertyGet(_, pi2, []) -> 
        let getObj = pi2.GetValue(null, null)
        printfn "%A" <| pi.GetValue(getObj, null)
    | _ -> failwith "fail"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:11:57+00:00Added an answer on May 23, 2026 at 5:11 am

    It depends what kind of property it is (static or instance) and whether or not it takes any arguments.

    Based on your pattern match it looks like your property doesn’t take any arguments, so we’ll put that aside.

    If it is a static property, then q is None and you just need to call propInfo.GetValue(null, null).

    If it is an instance property, then q is Some(instance) where instance is type Expr. That presents a problem. You need to be able to convert the expression to value you can pass as the first argument to GetValue. But if the expression is arbitrarily complex, that would require a lot of work to implement an expression evaluator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have method look like doSomething( Class<T> valueType) i call pass value like Map.class,
I was wondering - when would I want to use the .Value member on
each() method in jQuery contains such a statement: callback.call( value, i, value ) I
Doesn't value have to return toString() to be able to call value.toString()? When do
In a C program, how does function call by value work, and how does
I make a call just like this: value = ./simulated_annealing Which is a C
Im trying to return the value that a $ajax call returns, from a function
I want to call this procedure that sends one value that can be NULL
I'd like to call a function in python using a dictionary with matching key-value
I want to call a JavaScript function through PHP and store the returned value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.