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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:52:22+00:00 2026-06-09T08:52:22+00:00

I have a property ProductName in my Form. I am getting warning while compiling

  • 0

I have a property ProductName in my Form. I am getting warning while compiling the code.

FormInventory.ProductName hides inherited member ‘System.Windows.Forms.Control.ProductName'. Use the new keyword if hiding was intended.

below is my code

public partial class FormInventory : Form, IInventoryView
{
   public FormInventory()
   {
   } 

   public string ProductName
   {
      get { return this.textProductName.text; }
      set { this.textProductName.text = value; }
   }
}

textProductName is a textbox.

I know that ProductName hides the base class’s property Forms.Control.ProductName. My question is

  1. Is it possible to suppress the warning without Renaming my FormInventory.ProductName property

  2. I am currently in the beginning of the development, if i hide this property with the new modifier will there be any problem at the time of releasing the product, because base property Forms.Control.ProductName returns the product name of the assembly containing the control. Where as my FormInventory.ProductName returns a user entered value.

  3. Where will we be using this Forms.Control.ProductName, because i have never used it before.

I have searched and found Similar questions

  • Entity Framework hides inherited member Warning
  • Use new keyword if hiding was intended

these questions doesn’t solve my problem but helped me in understanding the cause for the warning.

  • 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-06-09T08:52:23+00:00Added an answer on June 9, 2026 at 8:52 am

    1. Yes, simply use the new keyword, like public new string ProductName { get; set; }

    2. No, it simply returns the name of the assembly.

    3. Its used for debugging and some “reflection”. I say “reflection” because it’s more like a human-made reflection.

    So, it’s safe to go forward this way. But why don’t you simply change it to MyCompanyProductName?

    Regards

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

Sidebar

Related Questions

I have a property in my backing bean that returns html code: public String
Using Visual Studio 2010 I have created system service installer IndexingService (property ServiceName in
I have a property on a page called public string productName { get; set;
I have property management application consisting of tables: tenants landlords units properties vendors-contacts Basically
hi i have property named. public bool ShowLabels{get; set;} and one toolbar menu button
I have a property in my view model which returns a constant under some
I have a property an NSArray property called toolbarButtons that in one instance (when
I have a property that RaisePropertyChanged(PropName, oldValue, true, true) when I don't have any
I have a property of type uint on my entity. Something like: public class
I have a property on my classes for logging service. private ILogger logger =

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.