473,386 Members | 1,720 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,386 software developers and data experts.

Converting String to int results in 0x3f ?


In Visual Studio.2003 I set up two command line arguments in the Project
Properties.

The arguments are

XFER 63

Written just like that.

If I example the value of args[1] it shows its equal to 63. Now I want
to capture that value in an int. So I do this:

int TransferID = Convert.ToInt32(args[1].ToString());
However, the value of TransferID ends up being 0x3f

Why?


--
The Texeme Construct
http://you-read-it-here-first.com
Nov 13 '06 #1
4 1968

Now that I look at it, it seems the debugger presents all the values of
int's as hex values.

Is that an application setting somewhere?

John Bailo wrote:
>
In Visual Studio.2003 I set up two command line arguments in the Project
Properties.

The arguments are

XFER 63

Written just like that.

If I example the value of args[1] it shows its equal to 63. Now I want
to capture that value in an int. So I do this:

int TransferID = Convert.ToInt32(args[1].ToString());
However, the value of TransferID ends up being 0x3f

Why?


--
The Texeme Construct
http://you-read-it-here-first.com
Nov 13 '06 #2
Yes

In the options somewhere,

Cor

"John Bailo" <ja*****@texeme.comschreef in bericht
news:ta******************************@speakeasy.ne t...
>
Now that I look at it, it seems the debugger presents all the values of
int's as hex values.

Is that an application setting somewhere?

John Bailo wrote:
>>
In Visual Studio.2003 I set up two command line arguments in the Project
Properties.

The arguments are

XFER 63

Written just like that.

If I example the value of args[1] it shows its equal to 63. Now I want
to capture that value in an int. So I do this:

int TransferID = Convert.ToInt32(args[1].ToString());
However, the value of TransferID ends up being 0x3f

Why?



--
The Texeme Construct
http://you-read-it-here-first.com


Nov 14 '06 #3
On Nov 13, 5:33 pm, John Bailo <jaba...@texeme.comwrote:
Now that I look at it, it seems the debugger presents all the values of
int's as hex values.

Is that an application setting somewhere?
Just right click the watch window and de-select the hexadecimal display
option.

Nov 14 '06 #4

Thanks, there was a 'Hex' button in my Dev toolbar.

Must have inadvertently clicked it!

Chris Dunaway wrote:
On Nov 13, 5:33 pm, John Bailo <jaba...@texeme.comwrote:
>>Now that I look at it, it seems the debugger presents all the values of
int's as hex values.

Is that an application setting somewhere?


Just right click the watch window and de-select the hexadecimal display
option.

--
The Texeme Construct
http://you-read-it-here-first.com
Nov 14 '06 #5

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

Similar topics

3
by: Stephan Brunner | last post by:
Hi I have created two flavors of an XSLT stylesheet to transform all attributes of an XML document to elements: They both work as expected with MSXML and XMLSPY but throw an exception ...
12
by: John Leslie | last post by:
I need to write a string to a file in EBCDIC. Do I need to do it character by character using a translation table, or is there a function to translate the whole string? (I am aware that I can...
11
by: Miki Watts | last post by:
I'm having a problem with encoding a string... here's my code: byte s = System.Text.Encoding.ASCII.GetBytes(FieldContent); Now, this works fine, as long as there are no bytes that are over 128,...
11
by: Steve | last post by:
I'm hoping someone can help me out. I'm a newbie to vb.net still. I'm trying to convert the code below from VB6 to VB.NET. I'm not sure of the best way to go. This is basically a simple...
2
by: Roy Rodsson via .NET 247 | last post by:
Hi all! I am using a stored procedure in SQL2000 for retrieving fileinformations from a db. the table as an uniqueidentifier for the file information. The stored procedure has a variable...
5
by: Steven Hill | last post by:
Hello All! Has C# any classes to convert html page to gif or tif? Anyone could please, give how to do it? Br Wew
2
by: Prophet | last post by:
Can someone help me troubleshoot this IISSTATE log ? I have tried to make sense out of it but with no luck I am currently running IIS5 on a Win 2k box. Hosting 3 web sites and runnning asp...
116
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
9
by: hari | last post by:
hi all, Im writing a code in which the bytes,needed to be splitted in to nibbles.each nibble needs to be made as byte. for example: consider 3B as byte, on splitting this I will get 3 and B.The...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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...

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.