# Try/catch conversion in Visual Learning 2022

**URL:** <https://forum.codewithmosh.com/t/try-catch-conversion-in-visual-learning-2022/9687>\
**Category:** C#\
**Created:** [January 4, 2022, 5:00pm UTC](https://forum.codewithmosh.com/t/try-catch-conversion-in-visual-learning-2022/9687 "2022-01-04T17:00:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inferno12](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Inferno12](https://forum.codewithmosh.com/u/Inferno12)\
**Post date:** [January 4, 2022, 5:00pm UTC](https://forum.codewithmosh.com/t/try-catch-conversion-in-visual-learning-2022/9687/1 "2022-01-04T17:00:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tlyates08](https://avatars.discourse-cdn.com/v4/letter/t/919ad9/32.png) [@tlyates08](https://forum.codewithmosh.com/u/tlyates08)\
**Post date:** [January 29, 2022, 1:32am UTC](https://forum.codewithmosh.com/t/try-catch-conversion-in-visual-learning-2022/9687/2 "2022-01-29T01:32:11Z")

</div>

.Net 6 Try Catch

void test()  
{  
try  
{

```
}
catch (Exception)
{

    throw;
}

```

}
