As Adam has pointed out, the difference in syntax between C# and VB.NET can be confusing to someone who's familiar with one rather than the other. That said, sometimes the issue is not that a question is C# specific or VB.NET specific, rather that the actual question only pertains to the .NET framework. In that instance I'd consider it appropriate to close the question as a duplicate.
For example, two question titles:
- How do I get a temporary filename in VB.NET?
- How do I get a temporary filename in C#?
Both of these could be answered by pointing the OP in the direction of the GetTempFileName
method on the System.IO.Path
class. Other than some "garnish" to cover assigning the result to a variable, there's nothing language specific in the question.
However, the example you cited also avoids any confusion regarding mapping long
, float
, etc, to their VB.NET data-types, the mere presence of which I would suggest would be a reason to not vote to close as a duplicate.