my character moves by acceleration i want him to move and immediately stop

how do i code this in c#

set Rigidbody.velocity to Vector3.zero, you can use Rigidbody.Sleep() function too