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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:55:57+00:00 2026-06-07T11:55:57+00:00

In our API library, we have a number of classes that implement a method

  • 0

In our API library, we have a number of classes that implement a method ComputeCurrentDefinitionHashCode, which combines the hash codes of each member field with a pseudo-random number that should be unique to that class.

This is based on Paul Hsieh’s “SuperFastHash” at http://www.azillionmonkeys.com/qed/hash.html

I’m trying to determine if it’s possible to use FxCop to ensure that the randomly generated number we put in each class is not duplicated in any other class.

In other words, can we save information from one class to the next?

  • 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-07T11:55:59+00:00Added an answer on June 7, 2026 at 11:55 am

    Yes, you can construct an FxCop rule that caches information across classes. However, depending on how you include the target number in your classes, this may or may not be a particularly good candidate for an FxCop rule. For example, if it is a literal passed as an argument to a base class constructor, then an FxCop rule might be an OK choice. However, if the source of the number is less “predictable”, a unit test approach might be preferable.

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

Sidebar

Related Questions

In testing out our API, one of our testers found out that when they
Im currently working with an API which requires we send our collection details in
We've to implement a REST API to access some features of our current server,
I'm trying to make an API library for our web services, and I'm wondering
I'm trying to build a python library for interacting with our RESTful API, but
one of our classes use the bundled jaxb api of jdk 1.6. When I
I have installed Tomcat, and using SLF4J as our logging framework. I copied slf4j-api-1.6.4.jar
We have a C++ library that we provide to several different clients. Recently we
We have a Rest API that requires client certificate authentication. The API is used
I have a third party library that I'm attempting to incorporate into a simulation.

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.