---
title: "Get a numeric value or string from an address of an attached process"  
description: "Get a numeric value or string from an address of an attached process"  
author: "Pravesh Singh"  
published: 2013-12-18  
updated: 2013-12-18  
canonical: https://www.mindstick.com/forum/1808/get-a-numeric-value-or-string-from-an-address-of-an-attached-process  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Get a numeric value or string from an address of an attached process

I am [building](https://www.mindstick.com/blog/23088/which-tonewood-is-suitable-for-building-a-guitar) a small [tool](https://www.mindstick.com/articles/12857/customization-software-a-perfect-tool-for-e-store-owners-to-make-big-bucks) which allows me to edit in real time the [memory](https://www.mindstick.com/blog/300050/what-causes-sudden-memory-loss) of an attached [process](https://yourviews.mindstick.com/story/1525/7-important-factors-that-may-affect-the-learning-process).

so the tool has 1 [numericUpDown](https://www.mindstick.com/forum/442/validation-on-numericupdown-control-in-c-sharp-dot-net) and 2 buttons, a get and a set.

**my set [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is as followed**

```
private void sendButton_Click(object sender, EventArgs e){    byte[] stat =BitConverter.GetBytes(Convert.ToInt32(statNumericUpDown.Value.ToString()));   
SetMemory(0x0175914a, stat);}
```

where I am stuck is reversing that process so I can get numbers from my attached process and send them to my numericUpDown.

I hope I explained well [enough](https://answers.mindstick.com/qa/48601/who-is-the-writer-of-the-one-life-is-not-enough) and any help would be much appreciated.

## Replies

### Reply by Anonymous User

Hi Pravesh,\

Surely the reverse of the process would simply be the reverse of what you have, i.e.:

```
byte[] statBytes = GetMemory(0x0175914a);int stat = BitConverter.ToInt32(statBytes);statNumericUpDown.Value = stat;
```

The key is BitConverter.ToInt32 for converting from a byte[] to an Int32.


---

Original Source: https://www.mindstick.com/forum/1808/get-a-numeric-value-or-string-from-an-address-of-an-attached-process

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
