Modify your constructor to the following so that it calls the base class constructor properly:
public class MyExceptionClass : Exception { public MyExceptionClass(string message, string extrainfo) : base(message) { //other stuff here } }
Note that a constructor is not something that you can call anytime within a method. That’s the reason you’re getting errors in your call in the constructor body.
Related Posts:
- What is a singleton in C#?
- My C# application is returning 0xE0434352 to Windows Task Scheduler but it is not crashing
- C# Set collection?
- Why is Dictionary preferred over Hashtable in C#?
- Does anyone still use [goto] in C# and if so why?
- How does the “Using” statement translate from C# to VB?
- What is the best way to parse html in C#? [closed]
- Best C# API to create PDF
- C# cannot convert method to non delegate type
- What is the difference between const and readonly in C#?
- Pass Method as Parameter using C#
- ArrayList vs List<> in C#
- What’s the @ in front of a string in C#?
- How to solve ‘…is a ‘type’, which is not valid in the given context’? (C#)
- Best way to repeat a character in C#
- How to empty a list in C#?
- How to open an Excel file in C#?
- What is a method group in C#?
- How do I save a stream to a file in C#?
- Print Pdf in C#
- Can a Byte[] Array be written to a file in C#?
- What is the difference between String and string in C#?
- Creating a List of Lists in C#
- C# int to byte[]
- No connection could be made because the target machine actively refused it?
- What does a lock statement do under the hood?
- Error : Could not load file or assembly or one of it’s dependencies
- Inheriting constructors
- Difference between Delphi and Delphi.NET
- Where/how can I download (and install) the Microsoft.Jet.OLEDB.4.0 for Windows 8, 64 bit?
- Inheriting constructors
- Get current folder path
- foreach vs someList.ForEach(){}
- Windows Application has stopped working :: Event Name CLR20r3
- Access to the path is denied
- What is the difference between ASP.NET MVC 6 and ASP.NET Core 1.0 and the reason behind the core framework?
- What does mscorlib stand for?
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- Add new item in existing array in c#.net
- Embed a System.String in XAML
- What’s the difference between struct and class in .NET?
- what is this oleaut32.dll?
- Where Is Machine.Config?
- HttpWebRequest-The remote server returned an error: (400) Bad Request
- How to use the “Using” statement in ASP.net razor webpages?
- Reading settings from app.config or web.config in .NET
- There is no argument given that corresponds to the required formal parameter – .NET Error
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Invalid URI: The format of the URI could not be determined
- Could not establish trust relationship for SSL/TLS secure channel — SOAP
- Cannot send a content-body with this verb-type
- Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction
- How to make an HTTP POST web request
- How to add comments into a Xaml file in WPF?
- Why did I get the compile error “Use of unassigned local variable”?
- Reading CSV file and storing values into an array
- Merge two (or more) lists into one, in C# .NET
- How to do constructor chaining in C#
- Cannot access a disposed object – How to fix?
- HashSet vs. List performance
- How to access Session variables and set them in javascript?
- How do you sort a dictionary by value?
- EntityType has no key defined error
- HTML.ActionLink method
- How do I restart my C# WinForm Application?
- How should I cast in VB.NET?
- How to split() a delimited string to a List
- Best way to reverse a string
- Warning: Found conflicts between different versions of the same dependent assembly
- How can I know if a process is running?
- What is the purpose ApplicationDbContext Class in (under IdentityModels.cs file) ASP.NET MVC 5?
- How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”
- windows could not start service on local computer error 5 access is denied
- Cannot attach the file *.mdf as database
- How to convert UTF-8 byte[] to string
- How can I download a file with batch file without using any external tools?
- The remote server returned an error: (405) Method Not Allowed. WCF REST Service
- Produce a random number in a range using C#
- What is the best way to give a C# auto-property an initial value?
- How do I concatenate two arrays in C#?
- How to play a sound in C#, .NET
- How can I delete a file that is in use by another process?
- Which passwordchar shows a black dot (•) in a winforms textbox?
- How do I fix a .NET windows application crashing at startup with Exception code: 0xE0434352?
- How to resolve file being used by another process?
- .NET Framework 4.6 or a later update is already installed on this computer
- Convert double to float by cast or Convert.ToSingle()?
- c# .net change label text
- How to avoid a System.Runtime.InteropServices.COMException?
- How do I find the PublicKeyToken for a particular dll?
- Consider app.config remapping of assembly with no app.config mapping
- What is a “first chance exception”?
- How can I generate random alphanumeric strings?
- Sequence contains more than one element
- How do you do a deep copy of an object in .NET?
- .NET Core vs Mono
- A certificate chain could not be built to a trusted root authority
- INQ: When to use SingleOrDefault vs. FirstOrDefault() with filtering criteria
- Linq: GroupBy, Sum and Count
- How to set session timeout in web.config