Access to serial port is denied

I am working on the interface between Kinect 360 and Arduino Uno, and I am using C# on Visual studio to send gestures to Arduino.
Here's the part of the code in C# that defines the port I am using:

SerialPort ArduinoPort = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);

and here's the part of the code in C# that opens the serial port when data is detected:

if (gesture.Length != 0)
          {
              ArduinoPort.Open();
              ArduinoPort.Write(gesture);
              ArduinoPort.Close();
          }

On the Arduino side, I open the Serial port, as usual, using Serial.begin(9600). When the gesture is detected, the compiler gets to the line ArduinoPort.Open() and gives an error: Access to COM3 is denied. I tried commenting that line out since I upload the Arduino code first to the board so that might make the port already open. I still get the same error. I checked the device manager and COM3 was already there and connected to the Arduino board. Where would the issue be? Could it be in my definition for the Serial port itself?

Do you still have the Arduino IDE open?

Yes, but I closed and tried the previous code and worked.
Thanks a lot!