How can I detect my screen size...?

Hi All,

Actaully I am running a cards game. While running the game in between if I change the style portrait to landscape… then how can I detect the screen size and run the game according the screen style (Portrait or Landscape).

Actaully I have written the code to detect the screen as portrait and landscape. But in between if I change the game portrait into landscape, no more it works.

Please let me know anyone solution for this.

Thanks for your efforts -

chethan.