Try/catch conversion in Visual Learning 2022

I am new, and the software the Mosh uses in the C# basic’s course is very old, and I’m not able to create a try/catch method for conversation. How would you do it?

.Net 6 Try Catch

void test()
{
try
{

}
catch (Exception)
{

    throw;
}

}