新手求教,VB代码编译为C#代码
各位大神:帮帮忙把下面这一组VB代码编译为C#代码,或者可以说一下C#里面怎么调用函数。我之前从未接触过C#,目前在自学中,在线等,谢谢
'调用函数
Private Function Pk(t) As Single
Dim Ti As Single
Dim c1, c2, c3, c4, c5, c6, c7 As Single
Dim c8, c9, c10, c11, c12, c13 As Single
c1 = -5674.5369: c2 = 6.3925247: c3 = -0.009677843
c4 = 0.00000062215701: c5 = 2.0747825E-19: c6 = -9.484024E-13
c7 = 4.1635019: c8 = -5800.2206: c9 = 1.3914993
c10 = -0.04860239: c11 = 0.000041764768: c12 = -0.000000014452093
c13 = 6.5459673
Ti = 273.15 + t
If t < 0 Then
Ln = c1 / Ti + c2 + c3 * Ti + c4 * (Ti ^ 2) + c5 * (Ti ^ 3) + c6 * (Ti ^ 4) + c7 * Log(Ti)
Pk = Exp(Ln)
Else
Ln = c8 / Ti + c9 + c10 * Ti + c11 * (Ti ^ 2) + c12 * (Ti ^ 3) + c13 * Log(Ti)
Pk = Exp(Ln)
End If
End Function