Cannot convert type `UnityEngine.Vector2' to `int'

My game default resolution is 800x500 in the webplayer. I want this resolution to be fixed, in case of changing resolution, the game load other scene. How can I do this?

error CS0030: Cannot convert type UnityEngine.Vector2' to int’

using UnityEngine;
using System.Collections;

public class Resolution : MonoBehaviour {

	Vector2 targetResolution;
	void Start()
	{
		targetResolution = new Vector2(800, 500);
	}
	
	void Update ()
	{
		if(Screen.width != (int)targetResolution || Screen.height != (int)targetResolution)
		{
			Application.LoadLevel("MainMenu");
		}
	}
}

Since Vector2 contains two values, you can’t simply convert it into one. But you can access these values (x and y coordinates).

void Update ()
     {
         if(Screen.width != (int)targetResolution.x || Screen.height != (int)targetResolution.y)
         {
             Application.LoadLevel("MainMenu");
         }
     }