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 4024850
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:46:23+00:00 2026-05-20T10:46:23+00:00

When refactor->renaming MyMethod in the following example in Visual C# 2010 Express, the method

  • 0

When refactor->renaming MyMethod in the following example in Visual C# 2010 Express, the method name ‘MyMethod’ in the comment won’t be changed.

Usually that a comment isn’t touched by refactor/rename is for good reasons, since how should the IDE know that it’s not just some word but actually references the very method that it is refactoring.

So is there a way in which a word in a comment can be bound to a class/method/variable name within Visual C# 2010 Express, so that it’s changed as well during refactoring/renaming?

If there are several ways what would be the easiest/cheapest way?
(cheapest – in case of plugins or commercial versions)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
  /// text for class MyClass
  public class MyClass
  {
    /// <summary><c>MyMethod</c> is a method in the <c>MyClass</c> class.
    /// </summary>
    public static void MyMethod(int Int1)
    {
    }
    /// text for Main
    public static void Main()
    {
      Console.ReadLine();
    }
  }

}
  • 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-20T10:46:23+00:00Added an answer on May 20, 2026 at 10:46 am

    At least in the commercial editions, the rename dialog (press F2) has an Search in Comments checkbox.

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

Sidebar

Related Questions

Is there any good way to deal with the class renaming refactor from Resharper
I want to refactor this mumbo jumbo of a method to make it more
How would you refactor this, keeping in mind that you have dozens more of
Does Visual Studio / Resharper support this? By refactor copy I mean to be
I refactor my and other people's code all the time . When I work
Do you refactor your SQL first? Your architecture? or your code base? Do you
How would you refactor these two classes to abstract out the similarities? An abstract
I often refactor code first by creating an inner class inside the class I'm
I'm trying to refactor a large, old project and one thing I've noticed is
How would I refactor this to get it to return a string not a

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.