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

简介: 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 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

 

网名:浩秦; 邮箱:root#landv.pw; 只要我能控制一個國家的貨幣發行,我不在乎誰制定法律。金錢一旦作響,壞話隨之戛然而止。
目录
相关文章
|
4月前
|
XML 存储 算法
BASE64的算法说明
【5月更文挑战第10天】BASE64的算法说明
48 3
|
4月前
|
存储 算法 JavaScript
base64编码是啥?
base64编码是啥?
37 0
|
11月前
|
机器学习/深度学习 算法 数据可视化
Induction base
Induction base 是一种基于归纳推理的算法或方法,通常用于解决机器学习或数据挖掘中的问题,特别是关联规则挖掘和分类问题。其基本思想是基于一些基本的规则或假设,通过反复应用于数据来推导出更复杂的规则或结论。
25 1
|
11月前
|
存储 JSON 安全
base64_encode()和base64_decode(),URL的加密解密详解
base64_encode()和base64_decode(),URL的加密解密详解
271 0
|
C语言
BASE系列
BASE系列
107 0
|
运维 算法 数据挖掘
Proximity-Base Approaches|学习笔记
快速学习 Proximity-Base Approaches
Proximity-Base Approaches|学习笔记
|
存储 算法 Java
md5base64 是什么,md5 base64使用场景, base64优势,Android 使用md5
md5base64 是什么,md5 base64使用场景, base64优势,Android 使用md5
277 0
|
JavaScript PHP
Base64初探
base64是一种编码格式。
924 0
Base64初探