C
C#2y ago
plushechka

❔ Help with realization Division by zero in wpf project

I want to throw out the error when dividing by zero. Since "Compute" gives infinity when divided by zero. I tried to do it through "Contains", but then it will be impossible to divide by decimal numbers
9 Replies
ero
ero2y ago
i see no division being done your inner try-catch is also... just weird
plushechka
plushechka2y ago
the attempt is contained in in "case '=' "
ero
ero2y ago
again, i see no division being done
plushechka
plushechka2y ago
one minute
ero
ero2y ago
if you want to see whether an input is exactly zero, do float.TryParse, no? if it returns false, it's not a number in the first place if it returns true, and the result is 0, then it's a zero
plushechka
plushechka2y ago
thank you, i'm trying maybe I misunderstood, but he forbids sharing, it's cool. However, when dividing by a decimal number, it also gives an error
plushechka
plushechka2y ago
plushechka
plushechka2y ago
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server
More Posts
Get data from a model and display it as dropdown on client side in RazorHi, how do I retrieve data in a database from a model and show it in as my dropdown values in my raz❔ Help with DI, i have different connection strings but same behavior for query DBHi, i want to instance the same query service but with different configuration and i have no idea ho❔ Help with stream reading and writing and displaying information at a certain timeSo I am currently doing stream writing and reading and I need it when the user types the student ID ✅ Foreign key not workingHi, I tried making a foreign key in my table, to another table which I made but it does not work as ✅ Shorten data querying lineHi, how do I shorten this line that's querying for data? Like, instead of putting them into one long❔ Blazor JS Interop - Return RTCPeerConnection from js to Blazor in order to close itHi, I've quite a complex task: In my Blazor application I use javascript to read webrtc data produce✅ Authentication with CookiesI'm playing around with cookies to get a better understanding. My code: ``` var builder = WebApplic❔ need help with visual studio communityhi i have multipul q 1- i have mac is there way to have community on it 2- please hoe to make 3 buUsing the new INumber interface to determine if an object is a number without having the generic argWith .net7 we now have the INumber<TSelf> interface which is pretty cool, and I thought I found a pl✅ Polyphormism?Is this polyphornism? I am not sure, I was told I should make something like this ```cs public abst