I am moving from WinForms & VB.Net to WPF & C#. My question is related to C#.
I have no idea of how to begin. I have trolled several forums for an idea of how to go about it, and get more confused as I go a long. The Function takes 3 string inputs from text boxes, converts them to real values, performs a calculation and returns a string value as an answer.
in VB.Net I would do the following:
Could someone please point me in the right direction, as I am clueless at the stage, of how to even start it in C#.
I have no idea of how to begin. I have trolled several forums for an idea of how to go about it, and get more confused as I go a long. The Function takes 3 string inputs from text boxes, converts them to real values, performs a calculation and returns a string value as an answer.
in VB.Net I would do the following:
VB.NET:
Function TestCalc(MilliAmps As String, PV_High As String, PV_Low As String)
Dim MilliAmps_dbl As Double
Dim PV_High_dbl As Double
Dim PV_Low_dbl As Double
Dim PV_Value_dbl As Double
Dim PV_Value_str As String
MilliAmps_dbl = CDbl(MilliAmps)
PV_High_dbl = CDbl(PV_High)
PV_Low_dbl = CDbl(PV_Low)
PV_Value_dbl = (((MilliAmps_dbl - 4) / 16) * (PV_High_dbl - PV_Low_dbl)) + PV_Low_dbl
PV_Value_str = CStr(PV_Value_dbl)
Return PV_Value_str
End Function
Could someone please point me in the right direction, as I am clueless at the stage, of how to even start it in C#.