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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:53:16+00:00 2026-06-06T09:53:16+00:00

I have a global variable averagel that I am trying to manipulate in a

  • 0

I have a global variable averagel that I am trying to manipulate in a method. The compiler doesn’t have a problem with me setting the value averagel = averagel / (xrestriction * yrestriction); but for some reason it doesn’t like it when I try to use it to set another variable:

inside = (inside + averagel * (xrestriction * yrestriction)) - 2 * (averagel)(suml);

Only on the line where I try to use averagel’s value to set another int does it return the error ‘sqlDataReader.ReaderDemo.averagel’ is a ‘field’ but is used like a ‘type’. I also tried setting an int in the method to the value of averagel and then trying to use that value to set my inside variable but that returned with an error of “The type or namespace name ‘test’ could not be found (are you missing a using directive or an assembly reference?)” and all I did the line before was declare int test=averagel;

Any ideas what could be going on here?

  • 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-06T09:53:18+00:00Added an answer on June 6, 2026 at 9:53 am

    You probably need an asterisk:

    inside = (inside + averagel * (xrestriction * yrestriction)) - 2 * averagel * suml; 
    

    You can’t multiply two values in C# like you can in mathematics. E.g. (averagel)(suml) makes sense in a math equation but you have to write averagel * suml in C#.

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

Sidebar

Related Questions

If i have global variable in A.dll, that depends on global variable in B.dll
I have a global variable that is an instance of my custom class. How
I have a vector declared as a global variable that I need to be
I have a global variable I called Y_VAL which is initialized to a value
Assume that I have a global variable user in application....like this: # GET /users.xml
For example, I have $theme global variable that is defined in the configuration file,
So in jQuery, I have a global variable currentSubNav that stores a current visible
I have a global variable MyGlobalVar and some code that looks like this: var
I have global variable fan_coil_ai_bi, and I use that variable to store some data
I have a global variable in my javascript, whose value I want to set

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.