View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fredrik Wahlgren Fredrik Wahlgren is offline
external usenet poster
 
Posts: 339
Default Range vs IRange What's the difference?

Hi

I found a C# example of an Excel add-in at
http://www.codeproject.com/dotnet/excelnetauto.asp. I made some changes to
this project and made a function that takes an Excel.Range as a parameter.

Intellisense showed that there is an interface called IRange as well as
Range. What's the difference? When would you want to use an IRange?

TIA,
Fredrik


Here's my added C# function.


public int GetRangeSize1(Excel.Range range)
{

return range.Columns.Count * range.Rows.Count;

}