473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does C# have Type Wrappers?

Hey folks,

Is it possible to create Type Wrappers in C#? If so, how do you do it?

For those not sure of what I mean, here's a quick link on Type Wrappers in
Java: http://home.cogeco.ca/~ve3ll/jatutor5.htm#tw

Thanks!
Nov 16 '05 #1
2 1308
John Smith <js@no.com> wrote:
Is it possible to create Type Wrappers in C#? If so, how do you do it?

For those not sure of what I mean, here's a quick link on Type Wrappers in
Java: http://home.cogeco.ca/~ve3ll/jatutor5.htm#tw


There's no need, due to boxing. However, your page has:

"Simple datatypes are passed by value and not by reference."

That suggests that you think reference type parameters in Java are
passed by reference - they're not, the reference is passed by value.
There's a difference between reference passed by value and value passed
by reference.

See http://www.pobox.com/~skeet/java/passing.html for more information.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Type wrapping is not needed in C# because the language will create an object
and place a value type into it when it is needed. This is called "boxing".
The inverse is to unwrap the value type from the object, which is called
"unboxing." The gyrations caused by Java's decision not to derive the base
types from the type "object" is simply not present in C#

Hope this helps,
--- Nick

"John Smith" <js@no.com> wrote in message
news:uQ*************@TK2MSFTNGP09.phx.gbl...
Hey folks,

Is it possible to create Type Wrappers in C#? If so, how do you do it?

For those not sure of what I mean, here's a quick link on Type Wrappers in
Java: http://home.cogeco.ca/~ve3ll/jatutor5.htm#tw

Thanks!

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2671
by: Peter Moscatt | last post by:
Does TKinter have a Grid widget ? If not (as I assume), what is the alternative ? Pete
28
1921
by: Peter Olcott | last post by:
I want to double check my understanding about how the .NET framework works. From what I understand every call to the .NET framework is ultimately translated into one of more API calls, is this...
14
4815
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
1
6862
by: TC | last post by:
Every time I open my project, I get a warning which says "There are updated custom wrappers available for the following referenced components: Office." When I double-click on the warning, I get...
11
2523
by: Fan Yang | last post by:
I'm reading Modern C++ Design, and it is saying "Variable template parameters simply don't exist." But I find VC7.1 & VC8 support this feature.Who can tell me that which is right -_-b Many thanks.
20
3633
by: Bob Sanderson | last post by:
This is my code: if (file_exists($Fname)) { echo "<td>$Fname exists</td>"; } else { echo "<td>$Fname does not exist</td>"; } $Fname is the full path to the file I'm trying to verify. When I...
1
1047
by: sn20063757 | last post by:
what is meant by the term type wrappers in java.What is their use in java programming
2
1546
by: sn20063757 | last post by:
what is meant by the term type wrappers .And what is their us in java programming . For example import java.util.*; import javax.swing.JOptionPane; public class Numyears { public static void...
1
2274
by: seth | last post by:
Hi: I'm trying to read JSON strings sent from the browser. Here is the scenario: 1. Using YUI tookit 2. sending JSON string from YUI toolkit - using the provided asyncRequest method. **I...
0
7376
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...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.