public class Solution {

public int[] TwoSum(int[] nums, int target) {

int[] result = new int[2];

```
if(nums.Count() >= 2)
{
Hashtable hash = new Hashtable();
for(int k = 0; k < nums.Count(); k++)
{
if(hash.ContainsKey(target - nums[k]))
{
result[0] = (int)hash[target - nums[k]];
result[1] = k + 1;
return result;
}
else
{
hash[nums[k]] = k + 1;
}
}
}
return result;
}
```

}