Melt butter, stir in flour, salt, pepper, sugar and onion.
Add sour cream gradually, stirring constantly.
Cook until thickened.
Fold in the green beans and heat thoroughly.
Pour into greased 11/2 quart casserole dish.
Grate cheese and sprinkle over beans.
Crush corn flakes into fine crumbs; mix with the melted butter and sprinkle over the cheese.
Bake in moderately hot oven for about 20 mins.