I am trying to port some code from java to C#, I have faced 2 problems so far. Here is the Java code:
public static void main(String[] args)
{
var ia = new byte[args.length];
for (int i = 0; i < args.length; i++)
try
{
ia[i] = Integer.decode(args[i]).byteValue();
}
catch (NumberFormatException e)
{
}
System.out.
println(Integer.toHexString(Calc(ia, ia.length)));
}
Obviously I have to change main to Main, length to Length but no idea about:
Integer.decode(args[i]).byteValue()
and
Integer.toHexString(Calc(ia, ia.length)).
Can someone tell me please what are the avilable options in .NET in these cases?!
Integerto find out what thedecodeandtoHexStringmethods do.