NSW Premier Barry O'Farrell speaks to media after giving evidence at the ICAC in Sydney on April 15, 2014.

AAP: Paul Miller

Illawarra government MPs have expressed shock at the sudden resignation of Barry O'Farrell as NSW Premier, while Opposition MPs say he failed to live up to his own standards.

New South Wales Premier Barry O'Farrell says he will resign owing to a "massive memory fail" when giving evidence to the Independent Commission Against Corruption (ICAC) on Tuesday.

Mr O'Farrell made the announcement after a handwritten note was produced Wednesday in which he thanks an executive from a water company for the gift of a $3,000 bottle of Grange wine.

The note was addressed to Australian Water Holdings (AWH) executive Nick Di Girolamo and tendered as evidence at the ICAC Wednesday morning.

Mr O'Farrell told the inquiry that he could not recall receiving the bottle, even after reading his handwritten note.

The speaker of the House of Representatives and Member for South Coast, Shelly Hancock, says she respects Barry O'Farrell as an honest, good person and wishes he wouldn't resign.

"Given the fact that he has held everybody else to such high standards he himself has felt that he has no alternative but to take this action," she said.

"I would be trying to convince him to rethink this decision, but I know him very very well and once he makes a decision like that it stands."

Kiama MP, Gareth Ward, has also been a staunch supporter of Barry O'Farrell in Opposition and in Government.

Mr Ward says Mr O'Farrell is very different to some Labor Party figures who have appeared before the Independent Commission Against Corruption.

"He is not somebody like Eddie Obeid who has been found to have corruptly engaged in practises involving mining licences and huge profits to himself, this is a lapse of memory which has led to this confession," he said.

The Member for Heathcote, Lee Evans, says he's considers Barry O'Farrell a man of high integrity who felt he had to fall on his sword.

"I'm shocked about what's happened and I'm upset about the results obviously, but as I said the man expects a lot out of every member of parliament and he is doing what he sees as the right thing by resigning as Premier," he said.

The Opposition's spokesman for the Illawarra, Ryan Park, says the revelations show New South Wales has a government in complete disarray.

Mr Park says it also shows the Premier was not able to live up to the standards that he set for himself and for his team.

"Barry O'Farrell has spent a lot of time over the last three years justifiably in many cases criticising the former Labor Government and I think Barry O'Farrell needs to realise that he's not perfect either," he said.

"And today he has made that very clear that he certainly is not above problems to do with integrity in his own backyard."

The Member for Wollongong, Noreen Hay, says attempts have been made in the past to link her to ICAC investigations, but all attempts to damage her reputation while Labor was in government failed.

"I am blessed if you will that all attempts to smear me have failed, but nonetheless people who basically set themselves up at certain standards and levels had better be able to live up to it," she said.