Convert Character to Integer

I am trying to convert some Java code to .net.  There is a function in java Character.getNumericValue("Take a character") and it spits out a number.  It does not look like the ascii number.  I read the documentation and it said  "This method returns the Unicode numeric value of the character as a nonnegative integer"

So an A is 10, B is 11 and so on and Z is 35.

How do I do that in vb.net.   I really need this for my program but I am not able to get the right function.

Thank you

 

 

0
kal30
11/7/2008 6:55:52 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

2 Replies
472 Views

Similar Articles

[PageSpeed] 16

I don't believe you got this down.

Char.getnumericvalue is the same exact function, however, it takes a Unicode "numeric" value, not "a", "b", "c". a b c returns -1.0

 

0
jlrolin
11/7/2008 9:16:27 PM

Try this..  

Dim c As Integer = CInt("A"C) 
' can also use the Convert class 
Dim d As Integer = Convert.ToInt32("A"C) 
  


My Blog


"Don't be afraid to be wrong; otherwise you'll never be right."
0
budugu
11/7/2008 9:20:29 PM
Reply:

Similar Artilces:

Error converting characters into server's character set. Some character(s) could not be converted.
Error converting characters into server's character set. Some character(s) could not be converted. No changes made to database. UPDATE Ticket_detail SET problem = 'mecho Team, I have set up several table repdefs in our test environment (PROD_jam) to determine the benefit of having table repdefs in addition to a database repdef. After I set up one of the table repdefs I ran several updates on the primary table to verify whether the where-clause was smaller on the replicate database. When I reviewed the transaction in the outbound queue on the secondary rep server (T...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

used a c#.net to vb.net converter and am now getting a syntax error.
ok I used a cool utility at http://www.kamalpatel.net/ConvertCSharp2VB.aspx to convert some c#.net to vb.net and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Converting classic to .NET 2 code, and .NET gets an error back from ADS?
 For future-proofing, our Internal Phone Directory is being moved onto our AD servers, and obviously we're using LDAP for queries.To get the phoneboook queries working, I adapted the current classic ASP code to use LDAP, and that works fine. However, we're wanting to move these pages to .NET, and that's where the problem comes in. Using the same basic logic from the Classic code (90% of its unchanged) to produce an LDAP query, I get the error  155 Unknown error (0x80005000)This is using the same website, and so the same credentials  - unless aspx pages run und...

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

How to convert Integer variable to Character
Hi, I have a value in an Integer variable , and I wanna convert this value to character. How can I do that. Appreciated You can type cast it... yourval.ToString() Are you looking for thisSushila Bowalekar PatelVisual ASP/ASP.NET MVPhttp://weblogs.asp.net/sushilasb Like this: Dim I As Integer = 5 Dim S as string S = I.ToString() You might wanna add a try catch block to this....while (!asleep()) ++sheep;...

How do I get started with AJAX.Net?
Hi All, I'm a seasoned asp.net developer but have not yet ventured into atlas et al.  I prefer books, but will take whatever I can get if it's good and will get me going. Any recommendations? Thx in advance. Jeff try here first http://ajax.asp.net/downloads/default.aspx?tabid=47 then learn from sample and docJames Wu (MIB426).NET is only way to goMCP, MCSE, MCDBA, MCSD, MCAD I find the materials online display features and implementations but are lacking architectural depth, and am seeking more comprehensive resources. By architectural depth, I mean that I cannot watch ...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Getting started .net website
Hi folks,Does anyone here know of a good website to just sit back and read for learning .net? Thanks in advance.Baldeep Right here... Click the Get Started and Learn sections here. Quite a few out there - - this one, has a lot of good videos -  also ASPNet101.com, but then, I might be a little prejudiced David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(P...

Getting Started with .net and a few questions
Hello I've done some asp and php programming along with various other languages in the past and slowing getting my head around .net.I have a small project of creating a Holiday Booking system on our Intranet and just trying to get the first part to work properly will hopefully get me sorted for the whole project. The Intranet is running on .net 2 and I prefer to use the VB code rather than C#. This is connecting to an SQL server.My initial page that I am trying to create is just for an admin user to view which dates in a table have been specified as Bank Holidays and be able to add ...

Getting acsii characters from an integer
Hi everyone, I'm sure this is a simple question, but I couldn't work out the answer. I'm randomly generating an integer which I then want to convert to the corresponding ascii character. I've looked up ToString hoping there's a simple answer but I can't find one. Does anyone know how to do this? I need to prove security of MD5/SHA hashing, so I'm wanting to randomly produce characters (a-z, A-Z, 0-9, and all the funky ones like ~,{=/? etc). Obviously I'm not going to try and do this for strings 1 to 50 characters in length, I'll be doing it for strings of length 1, 2, 3 and 4 ...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Spliting a character value and converting it to integer
Hi, I need to convert a varchar value like "1.4.14.5" to a number like 1041405 (adding a zero if the number is a single digit number. Could anybody please suggest me any way to do this. I am using version 15.0.3 of ASE. I tried doing it with the below sql: select convert(integer, str_replace(column_name, ".", null)) from database..table_name But, it returns the value like 14145. Could anybody please suggest what is the correct way of doing this or if there is any way to split this value for delimiter "." and store as 4 different numbers and then ...

Web resources about - Convert Character to Integer - asp.net.getting-started

Dilbert (character) - Wikipedia, the free encyclopedia
Dilbert is a fictional character and the main character and protagonist of the Dilbert comic strip . He is a white collar office worker who has ...

Borat outs Donald Trump as a Sacha Baron Cohen character on Jimmy Kimmel Live!
When is a parody a parody too far?&#160;When it's Donald Trump, of course.&#160;

Characters take life in Ripping by Lexx Productions at Belconnen Theatre in Canberra
... and adds a tweak or two of his own. Stam says, "I had an idea – what if you took the slasher-movie type thing and spent time with the characters ...

7 Characters You'll Meet in a Zumba Class
I could probably write a whole book about the different characters in a Zumba class, but I'll just start with this post. As most of my close ...

"I would like to be with Senator Cruz for a moment and I would like to respectfully ask him, since he ...
"I would like to know why he doesn’t quote my favorite line?... After the princess flies out the window and falls into Andre the Giant’s arms.... ...

This AI can draw alphabet characters as well as a human
... we use for imagination, explanation, and acting. But now, a team of researchers has developed an AI that they say can learn handwritten characters ...

The Top 10 Worst Characters On TV, According To Fans
With so much great television on at the moment, you have to have some really captivating characters to differentiate yourself from the plethora ...

Here's How Will Smith's Character Died In Independence Day: Resurgence Universe
Along with the first trailer, 20th Century Fox has launched a viral site for Independence Day: [...]

J.K. Rowling Compares Trump To Most Hated Character In Literature. Guess Who She Said Is Worse.
J.K. Rowling Compares Trump To Most Hated Character In Literature. Guess Who She Said Is Worse.

Tekken 7: Fated Retribution announced, the first new character is Street Fighter's Akuma
... at The King of Iron Fist Tournament 2015’s grand finals. Fated Retribution will be released first in arcades, and will include new characters, ...

Resources last updated: 12/15/2015 12:48:38 AM