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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:08:13+00:00 2026-05-21T20:08:13+00:00

I was commisioned to make other people’s code compliant with some StyleCop ruleset, as

  • 0

I was commisioned to make other people’s code compliant with some StyleCop ruleset, as far as possible.. now I was wondering about the following case:

I have an abstract class that contains a field

protected double[] coefficients;

Stylecop says: SA1401: Fields must be declared with private access. Use properties to expose fields.

So I changed it to:

protected double[] coefficients { get; set; } 

Stylecop says: SA1300: property names begin with an upper-case letter: coefficients.

Since it’s an abstract class, the child classes are beyond my control. And they use their parent’s class field base.coefficients.. well.

So.. there is no way other way to get rid of this warning than to suppress (or disable) it, right? :T

  • 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-21T20:08:14+00:00Added an answer on May 21, 2026 at 8:08 pm

    Well, actually you don’t.

    If you want to get it clean in future releases of the code, you could set the coefficients property deprecated and provide a message that states that this property will be removed in any further version of the code.

    In the current release:

    private double[] _coefficients;
    
    // Using this property will produce a compile-time warning.
    [Obsolete("coefficients will be removed in future versions. Use Coefficients instead.")]
    protected double[] coefficients 
    { 
        get { return _coefficients; } 
        set { _coefficients = value; } 
    }
    
    protected double[] Coefficients 
    { 
        get { return _coefficients; } 
        set { _coefficients = value; } 
    }
    

    In a later release:

    private double[] _coefficients;
    
    // Using this property will produce a compile-time error.
    [Obsolete("coefficients was removed. Use Coefficients instead.", true)]
    protected double[] coefficients 
    { 
        get { return _coefficients; } 
        set { _coefficients = value; } 
    }
    
    protected double[] Coefficients 
    { 
        get { return _coefficients; } 
        set { _coefficients = value; } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been comissioned to make a website complete with a user login system
I have the following code but it keeps presenting errors. The first part of
This may be subjective, I don't know: I have this problem, which I'm kind
Three weeks ago, I completed a project for a guy. My former CEO gave
Arg! I have a custom harness executable running my class library project. Every time
I have a function that's called hundreds of thousands of times per update, and
Commisions (commisionID INT, EmployeeID, amount INT, created Datetime) Sales (saleID INT, EmployeeID, amount INT,
I work for a web agency and we have just been commissioned to produce
I have always included clauses to transfer to my clients full author, ownership and
If you're in a team and a programmer gives you an interface with create,

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.