クラス名の識別のため名前空間をusingして利用する形になり、それはファイルごとに都度記載することになるが
using System.Reflection;
var directoryPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
他のファイルでも使う場合、globalをつけることで、全ファイルでその名前空間が参照されることになる
global using System.Reflection;
var directoryPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
※これなら他のファイルでもAssemblyクラスがそのまま使える
名前のエイリアスでも同様にglobalが使えます
global using Excel = Microsoft.Office.Interop.Excel;