---
title: "how to convert string value to hexa value in vb.net"  
description: "how to convert string value to hexa value in vb.net"  
author: "Madhu Mitha"  
published: 2015-03-25  
updated: 2015-03-25  
canonical: https://www.mindstick.com/forum/23050/how-to-convert-string-value-to-hexa-value-in-vb-dot-net  
category: ".net"  
tags: ["vb.net"]  
reading_time: 1 minute  

---

# how to convert string value to hexa value in vb.net

hi... i want to [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) my [string value](https://www.mindstick.com/forum/159623/how-to-get-an-enum-value-from-a-string-value-in-c-sharp) to hexadecimal value...when i enter a string in [textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) a [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) should generate the hexadecimal value of the string..\
how it is possible..\

## Replies

### Reply by Anonymous User

You can try this Code:\

```
   Dim val As String   val = "10"   Dim hexVal As Integer   hexVal = Convert.ToInt32(val, 16) //16 specifies the base   Console.WriteLine(hexVal)
```


---

Original Source: https://www.mindstick.com/forum/23050/how-to-convert-string-value-to-hexa-value-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
