Possible duplicate:
Providing a property with the same name as its class
In working on a solution where I was trying to βaddβ properties to a private class , someone pointed out that my property name with the same name as the type posed problems .
Here is a snippet of my code:
class BackupFileInfo : IEquatable<BackupFileInfo> { public FileInfo FileInfo { get; set; } }
I would rather just inherit FileInfo , but I cannot, as it is sealed. I would also like to call it FileInfo (since thatβs exactly what it is), but you want to avoid potential problems later. I am trying to avoid stupid names like MyFileInfo , but I donβt understand what is the best way to name a property like FileInfo .
Is there a best practice for naming in this situation?
Ben mccormack
source share