Any way to simulate intra-statement comment in VB.net? -
i have list of guids need put array literal in vb. each of them corresponds entity i'd document in code. in c#, i'd this:
var guids = new[] { guid.parse("70b11854-ac3e-4558-85d9-dc2451d7dce2"), // thing foo guid.parse("dec3cc2c-9d22-4d7f-8293-8e584795211c"), // thing bar };
i'd in vb:
dim guids = { guid.parse("70b11854-ac3e-4558-85d9-dc2451d7dce2"), ' thing foo guid.parse("dec3cc2c-9d22-4d7f-8293-8e584795211c") ' thing bar }
but comments in middle of (multi-line) statement not legal. there way achieve type of comment in vb?
vb not support this.
the best option split multiple statements.
const guid1 = "70b11854-ac3e-4558-85d9-dc2451d7dce2" ' thing foo const guid2 = "dec3cc2c-9d22-4d7f-8293-8e584795211c" ' thing bar dim guids = { guid.parse(guid1), guid.parse(guid2) }
this @ least provides comments inline without adding overhead.
Comments
Post a Comment