Skip to content

VB -> C#: Convert Date literals #159

Closed
@kanonrai

Description

@kanonrai

Input code

Public Function foo(Option ByVal date As Date = #1/1/1900#)

Erroneous output

Error message:
System.ArgumentOutOfRangeException: Exception of type 'System.ArgumentOutOfRangeException' was thrown.
Parameter name: value
Actual value was 1/1/1900 12:00:00 AM.
   at ICSharpCode.CodeConverter.CSharp.CommonConversions.GetLiteralExpression(Object value, String valueText)
   at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.VisitLiteralExpression(LiteralExpressionSyntax node)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)

Details

Product in use: vs extension

Metadata

Metadata

Labels

VB -> C#Specific to VB -> C# conversion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions