Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7919543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:54:09+00:00 2026-06-03T15:54:09+00:00

Consider the following code: [DataContract] class QObject { public QObject() { } [DataMember(Name =

  • 0

Consider the following code:

[DataContract]
class QObject {
    public QObject() { }
    [DataMember(Name = "objectindex")]
    public int ObjectIndex { get; set; }
    [DataMember(Name = "datapoint")]
    public int DataPoint { get; set; }
    [DataMember(Name = "type")]
    public string Type { get; set; }
    [DataMember(Name = "data")]
    public int[] Data { get; set; }
    [DataMember(Name = "parameters")]
    public string __Parameters {
        get {
            return this.__Parameters;
        }
        set {
            Parameters = new Dictionary<string,string>();
            Parameters.Add("key", "value");
        } 
    }
    public Dictionary<string, string> Parameters;
}

Which seems fine by me, but when I want to compile, it gets the following error:

‘QuartzService.NET.QObject.__Parameters.get’ must declare a body because it is not marked abstract, extern, or partial

The strange thing is, that the get has declared a body. So, how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:54:12+00:00Added an answer on June 3, 2026 at 3:54 pm

    a getter returns another variable not itself . Maybe you want to return something from parameters. Furthermore your setter always creates a new dictionary and adds the same thing into it. What are you trying to do?

    try something like this

            public string __Parameters
        {
            get { return this.recreate(); } 
            set
            {
                Parameters = parse(value));
            }
        }     
    
        public Dictionary<string, string> Parameters;
    

    where the parse funciton takes in a string, breaks it and stores it into the dictionary. and the recreate function uses the dictionary to recreate the string.

    also Do this:

     public Dictionary<string, string> Parameters = new Dictionary<String,String>();
    

    so that you dont accidentally get null pointers and since you only need one dictionary in my opinion. (Dont forget to clear it though when you parse a new String ).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider following code public class City { public string Name { get { return
Consider the following code: @Entity @Table(name = a) public class A implements Serializable {
Given the following code, [DataContract] public class TestClass { [DataMember] public object _TestVariable; public
Consider the following code: public abstract class Test1 { public object Data { get;
consider the following code: public class SynchronizedCounter extends Thread { private int c =
Consider the following code: public class MyClass { public static string MyStaticMethod() { //string
Consider the following code in a DLL: public class ReceivingClass { private Assembly myAssembly;
Consider the following code: abstract class SomeClassX<T> { // blah } class SomeClassY: SomeClassX<int>
Consider the following code: public abstract class RepositoryBase<T> where T : class { #region
Consider the following code, public class StartUp { public StartUp(String[] test){} public static void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.