Good afternoon. I rewrote the library from C # to a more convenient for myself VB.NET and could not figure out how to write two pieces of code.
Code 1.
throw new RucaptchaErrorException((RucaptchaError)Enum.Parse(typeof(RucaptchaError), str.Substring(6))); Attempting to get at least some code through a decompiler looks like this:
Throw New RucaptchaErrorException(DirectCast(Enum.Parse(GetType(RucaptchaError), Str.Substring(6)), RucaptchaError)) Code 2
public object Clone() { var paramsContainer = new ParamsContainer(); foreach (var obj in from object index in Params.Keys select (Param) Params[index]) paramsContainer.Params.Add(obj.Key, obj); return paramsContainer; } When you try to convert this method, the decompiler has completely demolished the roof and the resulting piece is not even worth bringing.
Please help.