How do I find which string comes first alphabetically?

I have two stings and I need to be able to tell which one comes first so that I’ll be able to go into an if statement. Here is some code that might show better what I am trying to do.

if(dataKey > "uqid"){
	attributePos = 2;
}
// this returns an error because the > opterator cannot be 
//used with a left hand side of type 'String' and a right
//hand side of type 'String'.

I know there must be some simple way of doing this, but I’m having a lot of trouble finding it. If anyone could help that would be great.

Don’t know for sure if you’re using C# or not, but String.Compare or String.CompareTo is what likely what you’re looking for.