Insert C# datatable into SQL Server temp table with dynamic column

Please don't mark this as a duplicate as this is different other questions in so. I have created a datatable in C# and I want to copy the data into a temp table in SQL Server.

I want the columns of the temp table to be created dynamically to the columns in the datatable. If I can create the temp table dynamically SqlBulkCopy can be used I think. Any help is appreciated.

I know creating a table type is the next option if this cannot be done.

I know this is wrong. but I'm looking for something like this,

using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))

    SqlCommand cmd = new SqlCommand("SELECT * INTO #tempTable FROM " + dt, con);