0

Heya guys,

I have a very small snippet that drives me crazy right now.

int arg1;
int expr1 = arg1 = 16;

That silly online translators giving me the following output

Dim arg1 As Integer
Dim expr1 As Integer = InlineAssignHelper(arg1, 16)

Great but what should i write in the "InlineAssignHelper" function? What should that function return?

Edited by GeekByChoiCe: n/a

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by GeekByChoiCe
0

what should i write in the "InlineAssignHelper" function?

Nothing. Don't use it.

int arg1;
int expr1 = arg1 = 16;

is a very stupid way to set initial values to variables. It's the same as:

int arg1 = 16;
int expr1 = 16;

and now the code is trivial to translate:

Dim arg1 As Integer = 16
Dim expr1 As Integer = 16

HTH

0

Knew C#'ers are weird :p
Thank you, couldn't really see any sense in that snippet at all.

Edited by GeekByChoiCe: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.