Click here to Skip to main content
15,888,968 members
Home / Discussions / C#
   

C#

 
AnswerRe: impresiones en c# Pin
phil.o26-Apr-12 6:48
professionalphil.o26-Apr-12 6:48 
AnswerRe: impresiones en c# Pin
Abhinav S26-Apr-12 7:02
Abhinav S26-Apr-12 7:02 
AnswerRe: impresiones en c# Pin
jschell28-Apr-12 7:44
jschell28-Apr-12 7:44 
Questionspooler en c# Pin
samuelalvarito26-Apr-12 6:40
samuelalvarito26-Apr-12 6:40 
Questioncomo usar el evento drag&drop para cargar documentos office en un formulario de c# Pin
samuelalvarito26-Apr-12 6:39
samuelalvarito26-Apr-12 6:39 
AnswerRe: como usar el evento drag&drop para cargar documentos office en un formulario de c# Pin
Abhinav S26-Apr-12 6:45
Abhinav S26-Apr-12 6:45 
AnswerRe: como usar el evento drag&drop para cargar documentos office en un formulario de c# Pin
Bernhard Hiller26-Apr-12 21:52
Bernhard Hiller26-Apr-12 21:52 
QuestionReleaseComObject() or not? Pin
__John_25-Apr-12 23:09
__John_25-Apr-12 23:09 
How do I know whether or not to call ReleaseComObject()?

For example in the following code I call ReleaseComObject() on the Worksheet, it works fine, but I dont rearly know if this is correct or not. How would I know? Is there a rule that I need to follow?
try
{

    Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();

    string strWorkBook = @"C:\zz\Book1.xlsx";

    Workbook workBook = excelApp.Workbooks.Open(strWorkBook,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing);


    int nSheets = workBook.Sheets.Count;
                
    Worksheet sheet = (Worksheet)workBook.Sheets[1];


    // Do somthing with the Worksheet...


    Marshal.ReleaseComObject(sheet);

    workBook.Close(false, strWorkBook, null);
    Marshal.ReleaseComObject(workBook);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}

“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford

AnswerRe: ReleaseComObject() or not? Pin
Abhinav S26-Apr-12 6:23
Abhinav S26-Apr-12 6:23 
GeneralRe: ReleaseComObject() or not? Pin
pietvredeveld26-Apr-12 10:30
pietvredeveld26-Apr-12 10:30 
QuestionNeed help in bluetooth OBEX Profile Implementation Pin
sripriya shankar25-Apr-12 19:11
sripriya shankar25-Apr-12 19:11 
Questionknow about basic of all oops concepts Pin
baskaran chellasamy25-Apr-12 18:25
baskaran chellasamy25-Apr-12 18:25 
AnswerRe: know about basic of all oops concepts Pin
Ravi Bhavnani25-Apr-12 18:43
professionalRavi Bhavnani25-Apr-12 18:43 
GeneralRe: know about basic of all oops concepts Pin
Vipin_Arora25-Apr-12 18:57
Vipin_Arora25-Apr-12 18:57 
AnswerRe: know about basic of all oops concepts Pin
John Orendt26-Apr-12 10:09
John Orendt26-Apr-12 10:09 
AnswerRe: know about basic of all oops concepts Pin
Alan Balkany27-Apr-12 4:37
Alan Balkany27-Apr-12 4:37 
AnswerRe: know about basic of all oops concepts Pin
jschell28-Apr-12 7:46
jschell28-Apr-12 7:46 
QuestionRetrieve client computer services, hardware information of a particular client Pin
nemichand.choudary25-Apr-12 18:04
nemichand.choudary25-Apr-12 18:04 
AnswerRe: Retrieve client computer services, hardware information of a particular client Pin
Luc Pattyn25-Apr-12 18:13
sitebuilderLuc Pattyn25-Apr-12 18:13 
QuestionExcel add-in Pin
Muammar©25-Apr-12 13:28
Muammar©25-Apr-12 13:28 
AnswerRe: Excel add-in Pin
Richard Andrew x6426-Apr-12 10:59
professionalRichard Andrew x6426-Apr-12 10:59 
QuestionControl Ip Camera Pin
Synodiporos25-Apr-12 7:01
Synodiporos25-Apr-12 7:01 
AnswerRe: Control Ip Camera Pin
Wes Aday25-Apr-12 8:01
professionalWes Aday25-Apr-12 8:01 
GeneralRe: Control Ip Camera Pin
Synodiporos25-Apr-12 8:55
Synodiporos25-Apr-12 8:55 
GeneralRe: Control Ip Camera Pin
Wes Aday25-Apr-12 9:03
professionalWes Aday25-Apr-12 9:03 

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.