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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:25:57+00:00 2026-05-22T02:25:57+00:00

First of all I am new to C# programming. I read the parameter of

  • 0

First of all I am new to C# programming.

I read the parameter of

ImageObj.getBounds(ref GraphicsUnit unit);

When I tried this,

ImageObj.getBounds(ref GraphicsUnit.Pixel);

I still got the error. But this seemed to work perfectly fine.

GraphicsUnit u = GraphicsUnit.Pixel;
ImageObj.getBounds(ref u);

What is the difference between the two and how is the first wrong? Thank You.

  • 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-22T02:25:58+00:00Added an answer on May 22, 2026 at 2:25 am

    GraphicsUnit.Pixel is a property, you can not pass properties with ref/out parameters in C#. It’s because ref/out is like pointer to pointer in other languages but property is not a variable – it’s a 2 methods: getter and setter, so, you can’t pass a pointer to pointer to value because you haven’t value itself.

    Added:
    Ok, GraphicsUnit.Pixel actually is an enum member – you also can’t pass it with ref/out parameters because it’s a constant.

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

Sidebar

Related Questions

First of all, I'm fairly new to Java, so sorry if this question is
i'm new to this kind of things. Kinda the first post ever regarding programming,
First of all, i'm a Graphic designer so please ignore if this programming question
First of all, I'm fairly new to programming, so bear with me.. though I'm
First of all I'm new to the C# world. I just started this year
first of all I'm new to python and programming but you guys already helped
I am new to programming and this is my first project so I don't
first of all I'm totally new to FAST but I already have a couple
First of all, I'm kinda new to the barcode formats and what I do
First of all, I'm really new to the MVC Asp.Net ideology. I would like

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.