If that building is considered part of the courthouse then you cannot carry. If it is JUST a sheriff's building then you should be fine b/c of state preemption laws. (IANAL so this is not legal advice.)
One the other side of the issue, the class probably has a no loaded weapons in the classroom rule. The instructor may ask you to put your firearm in you car. The hunter safety course I took in Chesterfield had that rule. This is because they have guns there to demonstrate their function and safe handling procedures. If you can conceal however, they would not know.