❔ exception not being caught
I am converting a type with
Convert.ChangeType()
but I want to catch the invalid cast exception but it wont.43 Replies
ok
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/well, that catch will catch invalid cast exception, so the problem is something else, or you didn't re-build
i am using mono but i don't know if this interferes with the code running because it prints out that there was an exception
look at the call stack then
As a side note... why Mono...?
what else? coreclr made no sense to me
How did it not make sense?
.NET is the cross-platform runtime
There's zero reason to use Mono for any new project
Unless you're trying to do some weird shit like running WPF on Linux
the docs told me not to use some files but to run the code i needed the files and some files that i needed weren't mentioned.
also, isn't coreclr still in development?
Uh, no?
Hasn't been for years
Hell, it's no longer even named .NET Core
Now it's just .NET
Has been this way for 3 major versions already
oh
well are there any docs that are simple and make sense?
Microsoft's docs?
.NET documentation
Learn to use .NET to create applications on any platform using C#, F#, and Visual Basic. Browse API reference, sample code, tutorials, and more.
where do i find how to use the coreclr?
What do you mean?
so i can use c++ with c#
.NET programming with C++/CLI
Learn how to use C++/CLI to create .NET apps and components in Visual Studio.
it's too confusing i'd rather use mono
It started being confusing the moment you said you want to use C++ with C# lmao
yeah but mono is really simple to get to work unlike the coreclr which looks like writing c# code in c++
Just write C# code and skip the C++ part
what do you mean?
Why do you need to use C++ with C#?
Why are you talking about c++ in the first place? Just use c# with ".net"
What do you need it for that you can't do with C#?
i want to learn how to use c# and c++ together
Why
because i want to learn
then learn one thing first
pinvoke didn't go too well :\
With an obsolete framework
Lemme go learn cave painting right quick
Will make me more desireable on the job market
but that is not what i am trying to do
i'm not trying to get a job
i just want to learn...
So, I assume you already know C++ and C# well?
yeah
You not knowing about .NET makes me doubt that a little, but aight, go ahead and create your chimera of a project
ok
@youdontknowwhoiam what specially does Mono do better wrt C++ interop than the CoreCLR?
*specifically
i think he's talking about hosting the CLR within a C++ application
yeah i am
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.