1 Attachment(s)
VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
I am new to converting VB.Net code to C#.
In Visual Studio I right click the VB.Net form a choose 'Convert to C#'.
I then get 'cannot convert InvocationExpressionSyntax - see comment for details' errors.
Please see attachment for error listing.
I please need assistance with this.
Re: VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
The error message explicitly tells you to see the comment for details but it appears that you haven't done that, given that you haven't told us what the comment contains. The obvious next step is to follow that instruction.
Re: VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
I do not know where the comment is.
Re: VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
The comment will probably be in the code, just before the line of code specified in the error list.
Re: VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
As si said, it will presumably be a comment created in the code where the error is. Did you even look at the code? You can double-click an error in that list to be taken directly to the line in question.
Re: VB.net Conversion to C# 'cannot convert InvocationExpressionSyntax...' error
Sorry Sir, I had to deal with an issue.
The comment I found is:
#error Cannot convert InvocationExpressionSyntax - see comment for details
/* Cannot convert ArgumentListSyntax, System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.CodeAnalysis.VisualBasic.Symbols.ParameterSymbol.get_ExplicitDefaultValue()
at ICSharpCode.CodeConverter.CSharp.ExpressionNodeVisitor.CreateOptionalRefArg(IParameterSymbol p, RefKind refKind)
at ICSharpCode.CodeConverter.CSharp.ExpressionNodeVisitor.<GetAdditionalRequiredArgs>d__130.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__59`1.MoveNext()
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.SeparatedList[TNode](IEnumerable`1 nodes)
at ICSharpCode.CodeConverter.CSharp.ExpressionNodeVisitor.<VisitArgumentList>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at ICSharpCode.CodeConverter.CSharp.CommentConvertingVisitorWrapper.<ConvertHandledAsync>d__12`1.MoveNe xt()
I will be very grateful for any help. It's Greek to me.