Does anyone have a good sample code to share for c...
# suitescript
m
Does anyone have a good sample code to share for connecting via SOAP with VSTUDIO 2019 using TBA with sha256?
m
Here’s what I use:
m
thanks
s
is it commonplace to declare everything as
var
these days in C#? can C# now similarly infer the return type of functions as well (i.e. can you leave the
string
out of the
ComputeNonce()
method?
d
Cant speak for other Devs but I strongly type all variables in C# and generally only use var when dealing with LINQ queries.
m
I use
var
most of the time.
HMACSHA256 hashObject = new HMACSHA256()
is a bit redundant and most simple variable assignments seem to be like this. I probably should use
long timestamp = ComputeTimestamp()
since it’s not obvious what the return type of that function is from the name, but to be frank, it looks like I copied this code from the NetSuite help and tweaked it for my use case. The
string
is part of the method signature in the
CompunteNonce()
method so I believe it is required there.