It depends on the IMAP server. I assume you are talking about Gmail.
You can use Gmail labels or more common IMAP flags.
First take a look at Gmail labels approach. Note that labels are very similar to folders. Here's the sample of getting labels for a specific message:
List<string> labels = imap.GmailGetLabelsByUID(uid);
bool isStarred = labels.Contains(FolderFlag.XStarred.Name);
IMAP flags approach
Get most common email properties:
MessageInfo info = imap.GetMessageInfoByUID(uid);
bool isStarred2 = info.Flags.Flags.Contains(Flag.Flagged);
Get flags only (a bit faster):
List<Flag> flags = imap.GetFlagsByUID(uid);
bool isStarred3 = flags.Contains(Flag.Flagged);