I'm assuming that myRijndael is an instance of RijndaelManaged. You could call myRijndael.GenerateIV(), and then access myRijndael.IV. It will give you an array of 16 bytes that you can work with.