I have a valid South African passport and an expired British passport - it expired 18 October 2009. I need to travel to the UK in March 2015. Do I need a visa to get into the UK?
Given your choice of tags I believe this is relevant:
there is no formal requirement in United Kingdom law for British Citizens to carry a passport to enter the United Kingdom
and that despite being from six years ago is still the law. However note the risk of delay. If you don't need a passport (or travel document equivalent for such purpose) you won't need a visa. The length of time your passport has been invalid won't help.
If you want to enter the UK as a British citizen and you have an expired UK passport, your case is covered by Paragraph 12 of the Immigration Rules...
A person claiming to be a British citizen must prove that he has the right of abode in the United Kingdom by producing either:
(i) a United Kingdom passport describing him as a British citizen or as a citizen of the United Kingdom and Colonies having the right of abode in the United Kingdom; or
(ii) a certificate of entitlement duly issued by or on behalf of the Government of the United Kingdom certifying that he has the right of abode.
If you want to enter the UK as a British citizen, you need to show them a UK passport. There is no stipulation in the rule that says the passport must be current. However, the keyword in this rule is 'describing', so the passport needs to reasonably sync up with your appearance, age, and so on.
As always, carry a print out of Paragraph 12 with you when you travel. It's the so-called "letter of the law" and you can't get more authoritative than that.
Adding: if, instead you want to enter the UK as a South African citizen, you will need an entry clearance prior to arrival.