Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
AnswerRe: Windows application create an Excel file Pin
Dan Mos8-Jun-10 11:59
Dan Mos8-Jun-10 11:59 
AnswerRe: Windows application create an Excel file Pin
Ramkithepower9-Jun-10 4:01
Ramkithepower9-Jun-10 4:01 
Questionwindows application Pin
jashimu8-Jun-10 8:36
jashimu8-Jun-10 8:36 
AnswerRe: windows application Pin
Manas Bhardwaj8-Jun-10 9:08
professionalManas Bhardwaj8-Jun-10 9:08 
AnswerRe: windows application [modified] Pin
#realJSOP8-Jun-10 10:04
mve#realJSOP8-Jun-10 10:04 
AnswerRe: windows application Pin
LookSharp9-Jun-10 3:54
LookSharp9-Jun-10 3:54 
GeneralRe: windows application Pin
jashimu9-Jun-10 7:56
jashimu9-Jun-10 7:56 
QuestionLINQ DataContext and IDisposable Pin
Member 39190498-Jun-10 7:01
Member 39190498-Jun-10 7:01 
Hi - I'm implementing a data access layer in LINQ to SQL.

I have a DataContext MyDataContext which extends DataContext.

DataContext implements IDisposable.

However when I try to put MyDataContext in a using statement I get a compiler error:

'MyDataContext':type used in a using statement must be implicitly convertible to 'System.IDisposable'.

So is IDisposable not implicitly usable for derived classes or am I doing something wrong? Here is some sample code:

using (MyDataContext context = new MyDataContext())
{
//do some work
}
AnswerRe: LINQ DataContext and IDisposable Pin
Pete O'Hanlon8-Jun-10 10:01
mvePete O'Hanlon8-Jun-10 10:01 
QuestionIndexer Question Pin
David Knechtges8-Jun-10 5:54
David Knechtges8-Jun-10 5:54 
AnswerRe: Indexer Question Pin
harold aptroot8-Jun-10 6:10
harold aptroot8-Jun-10 6:10 
AnswerRe: Indexer Question Pin
T M Gray8-Jun-10 10:45
T M Gray8-Jun-10 10:45 
GeneralRe: Indexer Question Pin
harold aptroot8-Jun-10 10:56
harold aptroot8-Jun-10 10:56 
AnswerRe: Indexer Question Pin
LookSharp8-Jun-10 17:15
LookSharp8-Jun-10 17:15 
Questionmaking a text box more efficient Pin
codie30078-Jun-10 5:43
codie30078-Jun-10 5:43 
AnswerRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 6:23
mveDave Kreskowiak8-Jun-10 6:23 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 9:21
protectorAspDotNetDev8-Jun-10 9:21 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 10:12
mveDave Kreskowiak8-Jun-10 10:12 
GeneralRe: making a text box more efficient Pin
Pete O'Hanlon8-Jun-10 10:42
mvePete O'Hanlon8-Jun-10 10:42 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 12:09
mveDave Kreskowiak8-Jun-10 12:09 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 10:47
protectorAspDotNetDev8-Jun-10 10:47 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 11:03
sitebuilderLuc Pattyn8-Jun-10 11:03 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 12:45
protectorAspDotNetDev8-Jun-10 12:45 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 12:59
sitebuilderLuc Pattyn8-Jun-10 12:59 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 13:19
protectorAspDotNetDev8-Jun-10 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.