473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Can I convert int to reference type?

Hi everyone i need urgent help with my final project
basically i am trying to make a drawRect disappear
i was trying to do it by setting the x and y values (int) for the rect as setVisible(false) but i keep getting an error saying that int is not a reference type. Please help me I would reallly appreciate it
Jan 24 '15 #1
1 1379
chaarmann
785 Expert 512MB
Can you please post the code in question here?
It sounds that your problem is somewhere else.

Remark: you can always create an integer object out of an int and reference to it.
Like Integer i = new Integer(12);
Feb 3 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Lenn | last post by:
Hi, Could someone clarify my confusion regarding passing reference types to a method with ref keyword and explain when it's practical to use it. It's my understanding that in .NET reference...
13
by: Maxim | last post by:
Hi! A have a string variable (which is a reference type). Now I define my Method like that: void MakeFullName(string sNamePrivate) { sNamePrivate+="Gates" }
3
by: Scott M. | last post by:
If I pass a reference type ByVal, am I making a copy of the object on the heap or am I making a copy of a pointer to the object on the heap? If I pass a string object (reference type) into a sub...
9
by: Edward Diener | last post by:
Can one use 'ref' ( or 'out' ) on a reference type to create a reference to a reference in C#. I know one can use it on a value type to create a reference to that value.
3
by: DaTurk | last post by:
I was just curious. I know that a struct is value type by definition, and will be placed on the stack, but what if you have a reference type in the struct, say a string, or an array. Where will...
4
by: vincente13 | last post by:
i understand that in csharp "string" and "object" are reference type... For e.g. in this case myString is passed to a method and it changes the value of the string.. if string is a reference...
1
by: neeraj | last post by:
Hi All Can any give me the code for convert "DataColumn" data type of "DataTable". Even if data table already populated (have data) Actually I am creating one search module which searches the...
4
by: =?Utf-8?B?TGVvIExleXM=?= | last post by:
Hi, The code below generates a compile error on line 3 (dim d...) Dim o As Object = "1900-01-01" Dim s As String = TryCast(o, String) Dim d As DateTime = TryCast(o, DateTime) The error is...
1
by: subramanian100in | last post by:
consider template<typename TTest { // ... }; We can have a pointer type as argument to a template class. For example, we can have, int x = 100; Test<int*obj(&x); // assuming a suitable ctor...
6
by: GiJeet | last post by:
Problem using AS operator to cast Tag property Hello, I’m using the Tag property of a menu item to hold an enum value of a PictureBoxSizeMode. Eg: this.menuImageStretch.Tag =...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.