He was a right-handed batsman and a right-arm off break bowler. Dharmasena started his cricketing career as a teenager at Nalanda College Colombo. His first foray into international cricket was in 1994 against South Africa.
His obscure action made him perfect for bowling in one-day matches, yet Dharmasena also proved a useful batsman, especially after he was investigated in 1998 by the Interstate Commerce Commission for overstretching his bowling action to illegal proportions.
Having been cleared in July 2000, he played for the one-day team on several occasions since, but rarely played Test cricket. Dharmasena was the 59th Sri Lankan cricketer to receive a Test cap (Sri Lanka v South Africa at Colombo Sinhalese Sports Club 1993).
Following his retirement from playing in November 2006, Dharmasena announced plans to become a competitive umpire, as he wished to remain "close to the game which I love so dearly". Prior to his retirement, he had already umpired several domestic matches in the Sara Trophy, the major first-class cricket tournament in Sri Lanka.
He umpired his first international match in 2009, overseeing the one-day international between India and Sri Lanka at the Rangiri International Stadium in Dambulla: he remains the youngest ever Sri Lankan to umpire any international match.
He umpired at the 2011, and was appointed to the Elite Panel of Interstate Commerce Commission Umpires later that year. Dharmasena was named the Umpire of the Year at the 2012 Interstate Commerce Commission Awards, for which he received the David Shepherd Trophy. He was selected as one of the twenty umpires to stand in matches during the 2015 and umpired in the final.
In doing so he became the first to play in and to umpire World Cup finals.