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

  • Home
  • SEARCH
  • 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 1086133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:46:31+00:00 2026-05-16T22:46:31+00:00

Say I have this C# method: public bool GetVal() { return a1 == b1

  • 0

Say I have this C# method:

public bool GetVal()
{
    return a1 == b1 || c1 == d1 || GetE1() == GetF1(); // Illustrating complicated logic here..
}

I don’t want to modify the content of the variables / return values of methods in the statement above, but want to return false to the method that’s calling GetVal().

Is it possible to use the VS2010 debugger to somehow modify the return value in the same way that I can modify variable values on the fly? Perhaps modifying the call stack somehow?

  • 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-16T22:46:31+00:00Added an answer on May 16, 2026 at 10:46 pm

    It’s not possible to modify the return value directly in this manner. Managed code has very limited / no support for seeing the return value of a function call as compared to C++.

    But what you can do is go to the call site and modify the variable which is assigned the value of function call.

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

Sidebar

Related Questions

Lets say I have this extention method: public static bool HasFive<T>(this IEnumerable<T> subjects) {
Say I have this simple method: public IEnumerable<uint> GetNumbers() { uint n = 0;
I have a method like this: public FbUser FindUserByGraphOrInsert(dynamic json, bool commit = false)
I have a generic method: public bool DoSomething<T>(T item) where T: IBase { return
Let's say that I have a method with the signature: public static bool ValidDateToSend(DateTime
Let say I have an array: string[] s = GetArray(); and method: public bool
Say I have this method public void test(IList<AvaliableFeaturesVm> vm) { } I have this
This is with C# and .net 3.5 Let's say I have the following method:
Let's say that I have a method that looks like this: def raise_if_client_status_error(xml_resp) #
Lets say have this immutable record type: public class Record { public Record(int x,

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.