473,805 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET: How to Convert Alphabetic Numbers to Integers?

35 New Member
Hi all,

I need some help in my project (VB.NET) here is what I need:

I need to convert Alphabetic number (a. b. c. d. …..) into the integers (for example a=1, b=2, c=3 and so on). Can anyone give me a function or point me to an article that explains how to convert these alphabetic number into the integers. Thanks very much in advance.

Jerry.
Sep 24 '07 #1
3 3010
Plater
7,872 Recognized Expert Expert
Cast your chracters to char's then to int's.
They will be at their ascii code (look up an ascii chart to see the corrosponding values)
Sep 24 '07 #2
bldink
2 New Member
If you are going to take that route, which isn't a bad idea by any means, make sure that all the characters are of the same case (either all upper or all lower) as the ASCII values for the upper and lower case equivalents are two different numbers. EX: "A" is 26 higher (or more) than "a"; at least I think so...
Sep 24 '07 #3
Plater
7,872 Recognized Expert Expert
Yeah the codes:
A=65, a=97
.
Sep 24 '07 #4

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

Similar topics

6
1941
by: Markus Zeindl | last post by:
Hello, I want to write a simple encrypter, but I've got a problem: How can I convert characters into integers? I have got a string from the user, for example "Hi!". Now I get every character with a loop: <code> buffer = "" for i in range(len(message)):
30
21890
by: rh0dium | last post by:
Hi All, While I know there is a zillion ways to do this.. What is the most efficient ( in terms of lines of code ) do simply do this. a=1, b=2, c=3 ... z=26 Now if we really want some bonus points.. a=1, b=2, c=3 ... z=26 aa=27 ab=28 etc..
5
4938
by: PCV | last post by:
Hi All, I want to create a custom auto number in a form that looks like "CRA05001" where "CR" are fixed characters, then "A" should be for January as "B" for February and so on...(this part will change depending on the month, "05001" is the year "05" and "001" a sequential increment. I Know how to get "CR?05001" but I'm stuck on trying to convert the month number to the alpha characters. Any suggestions? Thanks in advance. This is a...
4
1385
by: JIM.H. | last post by:
Hello, string newStr=myStr.Substring(1,3); int newNum = System.Convert.ToInt32(newStr); This fails if newStr does not have all characters as numbers. How can you do this in a professional way? Thanks, Jim.
1
3471
by: mktilu | last post by:
do we have any function to convert the numbers into alphabet in vb 6.For example 25 to be converted to twenty Five. Its urgent
1
2922
by: Evando | last post by:
I need a possible solution to tackle my assignment.The instruction again is to write a program code in C to convert from Roman numbers into Decimals.Any possible solution which will run is needed. THANKS.
2
2495
by: sandeep2 | last post by:
how to convert the numbers into words in asp.net using c#,please help me,its very urgent....?
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10361
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10103
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7644
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5536
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5676
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3006
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.