7 Replies - 5596 Views - Last Post: 18 November 2012 - 12:19 PM

#1 pokiaka  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 76
  • Joined: 05-August 11

What are the common interfaces a C# programmer should be aware of?

Posted 14 November 2012 - 07:17 PM

I often find myself needing for an interface (e.g. when I want to keep my type convertible, compared, etc.) but unfortunately unaware of them (I'm not a big .NET developer.), so I'm not always coming up with familiar signatures.

So, I think that there are probably a lot more like me and it could be nice to have a list of the common interfaces, so whenever I'd make a type I could look if there's something I need.

So, I'll start (for the sake of others) and I hope you could inform us of more interesting (and common) interfaces.



(Note that the name of the interface and the <T> afterwards consist of 2 different links)

Lucky3's big ass list :bananaman:

This post has been edited by pokiaka: 16 November 2012 - 01:25 AM


Is This A Good Question/Topic? 2
  • +

Replies To: What are the common interfaces a C# programmer should be aware of?

#2 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1010
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: What are the common interfaces a C# programmer should be aware of?

Posted 14 November 2012 - 08:50 PM

I used to use IComparable<T> a lot, but now I'm using IComparer<T> more.
Was This Post Helpful? 0
  • +
  • -

#3 pokiaka  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 76
  • Joined: 05-August 11

Re: What are the common interfaces a C# programmer should be aware of?

Posted 14 November 2012 - 10:28 PM

View PostMomerath, on 14 November 2012 - 08:50 PM, said:

I used to use IComparable<T> a lot, but now I'm using IComparer<T> more.


Thank you!
I didn't quite get their purpose and differences, care to enlighten me?
Was This Post Helpful? 0
  • +
  • -

#4 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,682
  • Joined: 13-March 10

Re: What are the common interfaces a C# programmer should be aware of?

Posted 15 November 2012 - 04:35 AM

Why not just be a bit curious and find out yourself. Hint: Used when comparing objects.
Was This Post Helpful? 0
  • +
  • -

#5 lucky3  Icon User is offline

  • Friend lucky3 As IHelpable
  • member icon

Reputation: 231
  • View blog
  • Posts: 765
  • Joined: 19-October 11

Re: What are the common interfaces a C# programmer should be aware of?

Posted 15 November 2012 - 07:12 AM

This is not the list of common interfaces in .NET, but list of all I found (I could be missing some):

A:
IAppDomainSetup
IAsyncResult

B:
IBindableComponent
IButtonControl

C:
ICloneable
ICollectDatta
ICollection
ICollection(Of T)
IColumnMapping
IColumnMappingCollection
ICommandExecutor
IComparable
IComparable(Of T)
IComparer
IComparer(Of T)
IComponentEditorPageSite
IContainerControl
IConvertible
ICurrencyManagerProvider
ICustomFormatter

D:
IDataAdapter
IDataGridColumnStyleEditingNotificationService
IDataGridEditingService
IDataGridViewEditingCell
IDataGridViewEditingControl
IDataObject
IDataParameter
IDataParameterCollection
IDataReader
IDataRecord
IDbCommand
IDbConnection
IDbDataAdapter
IDbDataParameter
IDbTransaction
IDeviceContext
IDictionary
IDictionary(Of TKey, TValue)
IDictionaryEnumerator
IDisposable
IDropTarget

E:
IEnumerable
IEnumerable(Of Out T)
IEnumerator
IEnumerator(Of Out T)
IEqualityComparer
IEqualityComparer(Of Out T)
IEquatable(Of T)

F:
IFeatureSupport
IFileReaderService
IFormatProvider
IFormattable

G:
IGroupping(Of Out TKey, Out TElement)

H:
IHashCodeProvider

L:
IList
IList(Of T)
ILookup(Of TKey, TElement)

M:
IMessageFilter

O:
IObservable(Of Out T)
IObserver
IOrderedEnumerable(Of TElement)
IOrderedQueryable
IOrderedQueryable(Of Out T)

Q:
IQueryProvider
IQueryable
IQueryable(Of Out T)

S:
IServiceProvider
ISet(Of T)
IStructuralComparable
IStructuralEquatable

T:
ITableMapping
ITableMappingCollection

W:
IWin32Window
IWindowTarget

...and most useful of them all ILucky3Helpable!

This post has been edited by lucky3: 15 November 2012 - 07:13 AM

Was This Post Helpful? 3
  • +
  • -

#6 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3469
  • View blog
  • Posts: 10,698
  • Joined: 05-May 12

Re: What are the common interfaces a C# programmer should be aware of?

Posted 15 November 2012 - 11:42 AM

If you play with WPF or Silverlight a lot, INotifyPropertyChanged is something that you should be familiar with.

This post has been edited by Skydiver: 15 November 2012 - 11:42 AM

Was This Post Helpful? 2
  • +
  • -

#7 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: What are the common interfaces a C# programmer should be aware of?

Posted 18 November 2012 - 12:08 PM

If you find yourself needing an interface and you can't find an existing one that matches your need don't forget you can always create your own interface.
Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2241
  • View blog
  • Posts: 9,412
  • Joined: 29-May 08

Re: What are the common interfaces a C# programmer should be aware of?

Posted 18 November 2012 - 12:19 PM

And if you decide to define your own interface you can inherit multiple interfaces.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1