Line not working in C#?

I have this short line in java and it doesnt seem to transfer into C#. Anybody know why and how to do it right?

horizontalMovement = Vector2(rigidbody.velocity.x, rigidbody.velocity.z);

The error I am getting is “Expression denotes a type', where a variable’, value' or method group’ was expected”. I would be very thankful if someone could help me. Thank you in advance!

Provided HorizontalMovement is a variable declared elsewhere, the only thing your expression is lacking is a “new” operator:

HorizontalMovement = new Vector2(rigidbody.velocity.x, rigidbody.velocity.z);