473,387 Members | 1,749 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,387 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 1378
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.