C
C#•2y ago
Roji

Not sure what I'm doing wrong but my Total Fare is messed up [Answered]

Numbers don't add up
47 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
oh soo I have to add them before?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
why?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
I got it fixed
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
but now I have a different problems math problem 😦
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
so this is the example our teach gave us right
Roji
Roji•2y ago
if you look at the estimated fare that's were I'm having problems because my Total fare is messed up
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
Roji
Roji•2y ago
here's my code for UberX
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
the value is the one I made
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
nvm I had XL
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Roji
Roji•2y ago
for Uber X nvm Total fare still not matching up
Roji
Roji•2y ago
deluvas
deluvas•2y ago
Because you add 2 times bookingFeeX instead baseFare
Roji
Roji•2y ago
ooooooooh
Roji
Roji•2y ago
for the last part this is the example my teach gave me and this is what I got
Roji
Roji•2y ago
Kouhai
Kouhai•2y ago
You're doing ToString on the textbox, you need to the Value
Roji
Roji•2y ago
Roji
Roji•2y ago
so I have to turn the textbox into a number?
Kouhai
Kouhai•2y ago
This line is essentially textBox6.ToString()
Roji
Roji•2y ago
oh oh if I didn't put ToString it would indefinity as a number right?
Roji
Roji•2y ago
Kouhai
Kouhai•2y ago
The type TextBox has a property Text
Kouhai
Kouhai•2y ago
Roji
Roji•2y ago
Roji
Roji•2y ago
like that?
Kouhai
Kouhai•2y ago
what type is textBox6?
Roji
Roji•2y ago
what do you mean by type> type?
Kouhai
Kouhai•2y ago
In C# all variables, fields and properties have a type here the type of the variable message is string
Roji
Roji•2y ago
Roji
Roji•2y ago
I dont think it has a variable I didn't set it up yet
Kouhai
Kouhai•2y ago
textBox6 is a control, right? That textbox has a type, in the case of a textbox the type is TextBox ToString() called on TextBox doesn't return what is currently typed in it
Kouhai
Kouhai•2y ago
It returns the type name that's why you get this
Kouhai
Kouhai•2y ago
Now to get the content's of a TextBox you have a property in TextBox named Text
Roji
Roji•2y ago
Yeah I just had to do .Text
Accord
Accord•2y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server
More Posts
Azure Appserice 502 when upload large file [Answered]I have config my local project to accept large and test swagger locally fine But when upload to appCan't access record members [Answered]I have a record that looks like this ```cs public readonly record struct Card(Suite suite, Rank rankSlash Command works but gives error? [Answered]Hi, I'm trying to make a Discord Bot in .Net 6 and my Slash Command works but after the command it gUnity 2 golf, ball doesn't stop rolling and... [Answered]So i call this func when ball goes out of camera range. the position gets reseted but the ball is stSource Generator For NuGet ReferencesHey, I have source generator project which reads metadata of dll references and via that informationHi I want to know about this in keyword used in the attached image. [Answered]I know "in" keyword when used with method parameters but I am unable to understand the same in this Debug azure app remotelyI have issue how to know properly server name to debug web app in azure remotely with attach to procHow to filter list so that if there are objects with same values in fields? [Answered]Is there a way to filter objects so that objects with same field values are not duplicated in a listHow to assert HttpResponseMessage content in unit test [Answered]Let's say I have 2 variable like this: ```csharp var result = await sender.SendAsync(request); var tHow does content.mgcb work [Answered]How can I generater a `content.mgcb` file automatically, as I have assets I need