I need help with fixing errors translating from C# to VB.NET. I've used multiple translation tools (carlosag.net, telerik and more), and gotten pretty far, but I'm stuck at some errors, which you see below.
I've marked the error messages in the code with "TRANSLATE ERROR"....thanks so much for any help :)
ORIGINAL CODE 1:
public User GetUser(string UserId)
{
if (Authenticate(WebOperationContext.Current.IncomingRequest))
{
return new User
{
UserName = "UserName",
UserPassword = "UserPassword"
};
}
else
{
WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.Unauthorized;
throw new WebFaultException<string>("Unauthorized Request.", HttpStatusCode.Unauthorized);
}
}
TRANSLATED CODE 1:
<WebInvoke(Method:="GET", ResponseFormat:=WebMessageFormat.Xml, BodyStyle:=WebMessageBodyStyle.Bar ...
Go to the complete details ...