System.Data.SqlClient itself is managed code. However, it is built on top of several other libraries. Some of them are managed code and some are not.
The query itself is executed by a database. So, the text of the query (the part that is hard-coded in your program) would be considered managed code, but once the command is sent to a database, it is no-longer managed.
Once the .close command is executed, the connection itself is released from your .net app and returned to the connection pool (part of OLEDB, ODBC and/or other sub-systems). At that point, the connection is freed and the unmanaged part is released. Dispose will do everything close does and release other managed parts (connection string, etc).
It is always a good idea to call dispose on any object that implements it (or wrap it in a using block, like @IRSOG showed). In this case, it isn't particularly dangerous to just call close(). I wouldn't make a habit of it.