What is base..ctor(); in C#?

landv

于 2017-04-05 22:15:00 发布

242
 收藏
版权
I am disassembling some C# applications and I am trying to reconstruct the source code. I am disassembling the application along with the required DLLs.
I keep coming across this line base..ctor(); which gives me an error. The line occurs in some voids with in some subclasses of Stream and Exception.

Does anyone have any idea what the code should be? I am thinking the disassembler messed it up some how and it is clearly invalid code. So does anyone know what it is meant to mean and how I can change the line so it works?

Here is the code of one of the subclasses that line occurs in:

[Guid("ebc25cf6-9120-4283-b972-0e5520d0000E")]
public class ZlibException : Exception
{
    public ZlibException()
    {
        base..ctor();
        return;
    }

public ZlibException(string s)
    {
        base..ctor();
        return;
    }
}
It should be :

[Guid("ebc25cf6-9120-4283-b972-0e5520d0000E")]
public class ZlibException : Exception
{
    public ZlibException() : base()
    {
        return;
    }

public ZlibException(string s) : base()
    {
        return;
    }
}
Which calls the constructor with that signature on the base implementation of this class.

But by default the .NET CLR calls the base, blank constructor for you, so you don't actually need the : base()

原文地址:http://stackoverflow.com/questions/18150628/what-is-base-ctor-in-c
————————————————
版权声明:本文为CSDN博主「landv」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_30895047/article/details/103828982

What is base..ctor(); in C#?相关推荐

  1. Arale Base源码分析(含Attribute)

    Attribute的源码解析: --注:这部分的源码阅读起来比较费劲,可能解析的还不太到位,后续会多读几遍增添新的解释,后面随时更新. // 负责 attributes 的初始化 // attribu ...

  2. 【PXIE301-204】基于PXIE 总线的4 路Cameralink Base 图像采集卡

    产品概述: PXIE301‐204 一款基于3U PXI Express 总线的高性能4 路CameraLink Base 图像采集卡,该板卡采用Xilinx 的高性能Kintex‐7 系列FPGA ...

  3. C++面向对象程序设计_Part2

    目录 Composition(复合) 内存视角下的composition(复合) composition(复合)关系下的构造与析构 Delegation (委託) -- Composition by ...

  4. 结构struct(值类型)在实际应用要注意的二点:

    .Net中的数据类型大致可以分为二类:一类是值类型,一类是引用类型:结构(struct)是值类型,从性能上考虑值类型更有优势(关于值类型与引用类型的详细讨论不在本文范围内,大家可以去查阅相关资料).对 ...

  5. C++11新特性选讲 语言部分 侯捷

    C++11新特性选讲 语言部分 侯捷 本课程分为两个部分:语言的部分和标准库的部分.只谈新特性,并且是选讲. 本文为语言部分笔记. 语言 Variadic Templates move semanti ...

  6. More Effective C++ 笔记

    基础议题 1 当你知道你必须指向一个对象并且不想改变其指向时,或者在   重载操作符并为防止不必要的语义误解时,你不应该使用指针.     1 必须指向对象,不能引用空     2 始终指向相同的内存 ...

  7. 001 Figuring in C/C++

    1. forward declaration // Function void fun(int); 在此之后的代码可以引用fun,而fun的定义必须在某个地方提供. // Variables may ...

  8. Roblox剑九之剑二

    Roblox剑九之剑二[御码之剑] 御码导航 Roblox剑九之剑二[御码之剑] 前言 一.学习路线 二.Lua基础 1.Lua介绍 1.1 解释型语言 2.Lua特性 3.Lua的数据类型 3.1 ...

  9. 奇虎360 2013校园招聘笔试题

    转载自 http://blog.csdn.net/wanglongfei_hust/article/details/10041337 我的答案与解析: 1. D  2. C  3. B  4. A   ...

最新文章

  1. 无密码身份验证:安全、简单且部署快速
  2. Kubernetes v1.6开始支持RBAC
  3. 在spring boot中集成Swagger
  4. 从 Spark 的 DataFrame 中取出具体某一行详解
  5. 使用 SAP CDS view SQL Function 将视图某些字段进行合并
  6. Spring Boot笔记-IDEA使用JPA映射时解决cannot resolve column或cannot resolve table
  7. HTTPS抓包详细分析
  8. kappa与quadratic weighted kappa
  9. Quest、Mission、Task——游戏中的“任务”
  10. Spark从本地文件中统计包含某个字母的行数
  11. USACO-Stamps
  12. 线性代数系列(十一)--正交矩阵和正交化
  13. Latex 数学符号--双括号
  14. 就“敏捷软件开发(第二版)”书评答译者
  15. 嘉立创EDA专业版--从AD导入图纸定位尺寸
  16. linux系统Centos7重置root密码
  17. 【雕刻机】grbl control软件设置
  18. mysql greatest的用法_mysql least greatest
  19. 佳能Canon PIXMA iP4700 series 打印机驱动
  20. 【Vue】Vue项目开发目录结构和引用调用关系

热门文章

  1. ubuntu16.04无线网卡rtl8723be驱动问题
  2. SpringBoot2尚硅谷笔记
  3. Android sockot连接打印机EPSON ESC/POS指令打印
  4. Jdon框架(JdonFramework)应用系统
  5. 工业控制电气非标自动化设计安装调试PLC编程电路电气外包行业的前景预测与分析
  6. Java如何绘制圆锥,五、Unity 生成几种常用模型mesh-----ConeShape(圆锥体)
  7. 【面试题】网易互娱(游戏)2021校园招聘在线笔试 - 服务端开发工程师[文件系统]
  8. 计算机主机光盘故障,光盘放进电脑里打开了显示函数不正确是什么问题?怎么处理?...
  9. Oracle Database 9i/10g/11g编程艺术:深入数据库体系结构
  10. 【火炉炼AI】机器学习023-使用层次聚类算法构建模型