C#中这种看似未知的代码块是什么?

时间:2019-05-08 10:08:59

标签: c#

此代码后面的这个看起来很奇怪的块是什么?

            try
            {
                if (ossdSpreadSheet == null)
                    psErrorMessage = "Spread sheet document not created, cannot proceed!";
                else if (oXMLWriter == null)
                    psErrorMessage = "Add new sheet first before writing to sheet of workbook!";                
                {
                    oXMLWriter.WriteStartElement(new Row());
                    bValid = true;
                }
                return bValid;
            }
            catch (Exception ex)
            {
                psErrorMessage = ex.Message;
                return false;
            }

我想这是一个静态块,但是它有什么用?

0 个答案:

没有答案