oracleCommand only exists inside makeConnection so only code inside that function can access it, so I don't understand how your code even compiles. If you want to make a connection available you'll need to write a function like
public static OracleCommand GetConnection()
{
string connectionString = "XXXX";
OracleConnection con = new OracleConnection();
con.ConnectionString = connectionString;
con.Open();
OracleCommand oracleCommand = con.CreateCommand();
return oracleCommand;
}
Something like that anyway, and you'd call it like
var c = DBConnection.GetConnection();
Note the "static" on the method declaration.
The calling code would need to handle the cleaning up of the resources which is why code like this is usually a bad idea. Just create the command in any code that needs it.