New method cannot be accessed by new object - c#

Who ya gonna call?
Unrelated code to pose the problem. Not the best editor tool so being terse. Thanks.
A new method that is part of the derived class cannot be accessed by the new
object. All the Intellisense sees are the abstract parts of the base class. Typing them in and running them gets an error. If methods and fields can't be added what is the point of base to derived and on down. I have searched all examples and come up empty.
public class SalesEmployee : Employee
{
public decimal salesbonus; // Additional field
public SalesEmployee(string name, decimal basepay, decimal salesbonus)
{
this.salesbonus = salesbonus; // Create new field
}
public override decimal CalculatePay() // Override abstract
{
return basepay + salesbonus;
}
public decimal CalculateExtraBonus() // Not an override
{
return basepay + (0.5 * salesbonus); // Belongs to this class only
}
}
static void Main()
{
// Create new employee.
SalesEmployee employee1 = new SalesEmployee("Alice", 1000, 500);
decimal = employee1.CalculateExtraBonus(); // Can't see the new method
// Derived class cannot get to new method.
}
I'm thinking of trying the following. Typing out questions really helps.
{ SalesEmployee salesEmpInstance = employee1
decimal = salesEmpInstance.CalculateExtraBonus()
// Maybe this could see the method.

I'll ignore the syntax errors and assume you have it right in your actual code. However it looks like you forgot to call the parents constructor ("base") on your derived class constructor and then tried to access a variable only instantiated by the parent. Also you need to cast the literal "0.5" as a decimal.
You can read more about "base" on msdn
Working code is below. Output is 1250.
using System;
public abstract class Employee
{
public string name;
public decimal basepay;
public Employee(string name, decimal basepay)
{
this.name = name;
this.basepay = basepay;
}
public abstract decimal CalculatePay();
}
public class SalesEmployee : Employee
{
public decimal salesbonus; // Additional field
// -->ERROR HERE, You forgot to call the base and instantiate
// the fields of the parent.
public SalesEmployee(string name, decimal basepay, decimal salesbonus): base(name, basepay)
{
this.salesbonus = salesbonus; // Create new field
}
public override decimal CalculatePay() // Override abstract
{
return basepay + salesbonus;
}
public decimal CalculateExtraBonus() // Not an override
{
return basepay + ((decimal)0.5 * salesbonus); // Belongs to this class only
}
}
class Program
{
static void Main(string[] args)
{
SalesEmployee employee1 = new SalesEmployee("Alice", 1000, 500);
decimal aliceBonus = employee1.CalculateExtraBonus();
Console.WriteLine(aliceBonus);
}
}

Your code looks fine, I recommend you:
Remove the reference to the first class library from your new project.
Rebuild your first class library
Reference again the first class library dll file in your new project, maybe you referenced to an older version of the dll. You should reference to the last created dll of first class library
Correct your code like this
.
{
SalesEmployee employee1 = new SalesEmployee("Alice", 1000, 500);
SalesEmployee salesEmpInstance = employee1 ;
decimal result = salesEmpInstance.CalculateExtraBonus();
}
Anyway if you have not any reference in this case. Compair the following codes with your code. I tested it. It works...
Note1: You should use base in your constructor to pass name and basepay to their corresponding fields in base class.
Note2: Now Rebuild your project, have you any error? I have not! Have you VS Intellisense problem yet?

Related

Extension method not setting value

I have a product class that looks something like this -
public class Product
{
public int ProductId { get; set; }
public string Name { get; set; }
}
I have an extension class that looks like this
public static class ProductExtension
{
public static void FixProduct(this Product product)
{
product = new Product(){Name = product.Name.ToUpper()};
//product.Name is now UPPERCASE
}
}
In my Main method I have -
static void Main(string[] args)
{
Product p = new Product() {ProductId = 1, Name = "steve"};
p.FixProduct();
System.Console.WriteLine(p.Name);
}
This prints "steve" and not what I wanted it to print: "STEVE".
Why doesn't the assignment in the extension method work?
I suggest a small change to follow a fluent interface pattern. Instead of void, return the new product instead. Don't use ref, that is weird.
public static class ProductExtension
{
public static Product FixProduct(this Product input)
{
return new Product
{
Name = input.Name.ToUpper(),
Id = input.Id
}
//product.Name is now UPPERCASE
}
}
Then use it like this:
static void Main(string[] args)
{
var p = new Product()
{
ProductId = 1,
Name = "steve"
}
.FixProduct();
System.Console.WriteLine(p.Name);
}
A neat advantage of this approach is (if you think you will need it) you can support several product classes while preserving their precise type, e.g.:
public static class ProductExtension
{
public static T FixProduct<T>(this T input) where T: Product, new
{
return new T
{
Name = input.Name.ToUpper(),
Id = input.Id
}
}
}
Now you could use it on any derived product class while keeping exactly the same syntax.
class DeluxeProduct : Product
{ }
static void Main()
{
var p = new DeluxeProduct
{
Id = 1,
Name = "Steve"
}
.FixProduct();
Console.WriteLine(p.GetType().Name)); //outputs "DeluxeProduct"
}
Now on the other hand, if all you want to do is "fix" the product's name, you could just wrap it in a property.
class Product
{
private string _name;
public int Id { get; set; }
public string Name
{
get { return _name; }
set { _name = value.ToUpper(); } //Automatically "fix" it the moment you set it
}
}
...and then you don't need an extension method at all.
Extension methods cannot be used that way. In your method you create a new instance of Product and then assign it to product which is a local reference to the passed object, and not the original reference p.
When you first enter the function what you have is two references referencing the same object in memory.
Then just before exiting the method you have two objects, one referred by each reference, with the product reference, referencing a local variable being cleaned by the GC at the end of the method call.
Solutions:
To correct this and have it closest to what you were trying to do,
change your method to get a ref parameter:
public static void FixProduct(ref Product product)
{
product = new Product() { Name = product.Name.ToUpper() };
//product.Name is now UPPERCASE
}
and then:
ProductExtension.FixProduct(ref p);
I believe a better approach all together will be (by having it a
member function or an extension method) to update the object instead
of instantiating a new one:
public static void FixProduct(this Product product)
{
product.Name = product.Name.ToUpper();
}
In your extension method, you are assigning a new Product to the variable product. This doesn't end up affecting the original referenced Product.
Modify the method to the one below to set the name on the original passed in object.
public static void FixProduct(this Product product)
{
product.Name = product.Name.ToUpper();
}
Parameters are passed by value unless they are ref or out. this doesn't change that. You can understand this syntactically because ref and out require a variable reference; otherwise only an expression is required.
Unfortunately, you can't combine this with ref or out.
You can change the value of any parameter variable, though, except in the case of ref or out, it's best avoided or limited to quick touch-ups to the passed-in value that simplify later algorithmic code.
A method is permitted to assign new values to a value parameter. Such
assignments only affect the local storage location represented by the
value parameter—they have no effect on the actual argument given in
the method invocation.
— C# Language Specification
So, the assignment does work, just not in the ref or out way.

Refactoring class to get rid of switch case

Say I have a class like this for calculating the cost of travelling different distances with different modes of transportation:
public class TransportationCostCalculator
{
public double DistanceToDestination { get; set; }
public decimal CostOfTravel(string transportMethod)
{
switch (transportMethod)
{
case "Bicycle":
return (decimal)(DistanceToDestination * 1);
case "Bus":
return (decimal)(DistanceToDestination * 2);
case "Car":
return (decimal)(DistanceToDestination * 3);
default:
throw new ArgumentOutOfRangeException();
}
}
This is fine and all, but switch cases can be a nightmare to maintenance wise, and what if I want to use airplane or train later on? Then I have to change the above class. What alternative to a switch case could I use here and any hints to how?
I'm imagining using it in a console application like this which would be run from the command-line with arguments for what kind of transportation vehicle you want to use, and the distance you want to travel:
class Program
{
static void Main(string[] args)
{
if(args.Length < 2)
{
Console.WriteLine("Not enough arguments to run this program");
Console.ReadLine();
}
else
{
var transportMethod = args[0];
var distance = args[1];
var calculator = new TransportCostCalculator { DistanceToDestination = double.Parse(distance) };
var result = calculator.CostOfTravel(transportMethod);
Console.WriteLine(result);
Console.ReadLine();
}
}
}
Any hints greatly appreciated!
You could do something like this:
public class TransportationCostCalculator {
Dictionary<string,double> _travelModifier;
TransportationCostCalculator()
{
_travelModifier = new Dictionary<string,double> ();
_travelModifier.Add("bicycle", 1);
_travelModifier.Add("bus", 2);
_travelModifier.Add("car", 3);
}
public decimal CostOfTravel(string transportationMethod) =>
(decimal) _travelModifier[transportationMethod] * DistanceToDestination;
}
You could then load the transportation type and it's modifier in a configuration file instead of using a switch statement. I put it in the constructor to show the example, but it could be loaded from anywhere. I would also probably make the Dictionary static and only load it once. There is no need to keep populating it each time you create a new TransportationCostCalculator especially if it isn't going to change during runtime.
As noted above, here is how you could load it by a configuration file:
void Main()
{
// By Hard coding.
/*
TransportationCostCalculator.AddTravelModifier("bicycle", 1);
TransportationCostCalculator.AddTravelModifier("bus", 2);
TransportationCostCalculator.AddTravelModifier("car", 3);
*/
//By File
//assuming file is: name,value
System.IO.File.ReadAllLines("C:\\temp\\modifiers.txt")
.ToList().ForEach(line =>
{
var parts = line.Split(',');
TransportationCostCalculator.AddTravelModifier
(parts[0], Double.Parse(parts[1]));
}
);
}
public class TransportationCostCalculator {
static Dictionary<string,double> _travelModifier =
new Dictionary<string,double> ();
public static void AddTravelModifier(string name, double modifier)
{
if (_travelModifier.ContainsKey(name))
{
throw new Exception($"{name} already exists in dictionary.");
}
_travelModifier.Add(name, modifier);
}
public double DistanceToDestination { get; set; }
TransportationCostCalculator()
{
_travelModifier = new Dictionary<string,double> ();
}
public decimal CostOfTravel(string transportationMethod) =>
(decimal)( _travelModifier[transportationMethod] * DistanceToDestination);
}
Edit: It was mentioned in the comments that this wouldn't allow the equation to be modified if it ever needed to change without updating the code, so I wrote up a post about how to do it here: https://kemiller2002.github.io/2016/03/07/Configuring-Logic.html.
It looks to me like any solution based on your current method is flawed in one critical way: No matter how you slice it, you're putting data in your code. This means every time you want to change any of these numbers, add a new vehicle type, etc., you have to edit code, and then recompile, distribute a patch, etc.
What you really should be doing is putting that data where it belongs - in a separate, non-compiled file. You can use XML, JSON, some form of database, or even just a simple config file. Encrypt it if you want, not necessarily needed.
Then you'd simply write a parser that reads the file and creates a map of vehicle type to cost multiplier or whatever other properties you want to save. Adding a new vehicle would be as simple as updating your data file. No need edit code or recompile, etc. Much more robust and easier to maintain if you plan to add stuff in the future.
Sounds like a good candidate for dependency-injection:
interface ITransportation {
decimal CalcCosts(double distance);
}
class Bus : ITransportation {
decimal CalcCosts(double distance) { return (decimal)(distance * 2); }
}
class Bicycle : ITransportation {
decimal CalcCosts(double distance) { return (decimal)(distance * 1); }
}
class Car: ITransportation {
decimal CalcCosts(double distance) { return (decimal)(distance * 3); }
}
Now you can easily create a new class Plane:
class Plane : ITransportation {
decimal CalcCosts(double distance) { return (decimal)(distance * 4); }
}
Now create a constrcutor for your calculator that expects an instance of ITransportation. Within your CostOfTravel-method you can now call ITransportation.CalcCosts(DistanceToDestination).
var calculator = new TransportationCostCalculator(new Plane());
This has the advantage that you can exchange your actual transportation-instance without any code-change to your TransportationCostCalculator-class.
To complete this design you might also create a TransportationFactory as follows:
class TransportationFactory {
ITransportation Create(string type) {
switch case "Bus": return new Bus(); break
// ...
}
Which you call like
ITransportation t = myFactory.Create("Bus");
TransportationCostCalculator calculator = new TransportationCostCalculator(t);
var result = myCalculator.CostOfTravel(50);
You could define an abstract class like this, and have each TransportationMethod extend the abstract class:
abstract class TransportationMethod {
public TransportationMethod() {
// constructor logic
}
abstract public double travelCost(double distance);
}
class Bicycle : TransportationMethod {
public Bicycle() : base() { }
override public double travelCost(double distance) {
return distance * 1;
}
}
class Bus : TransportationMethod {
public Bus() : base() { }
override public double travelCost(double distance) {
return distance * 2;
}
}
class Car : TransportationMethod {
public Car() : base() { }
override public double travelCost(double distance) {
return distance * 3;
}
}
So in your actual method call, it could be rewritten like this:
public decimal CostOfTravel(TransportationMethod t) {
return t.travelCost(DistanceToDestination);
}
You could use a strategy class for each type of travel. But, then you'd probably need a factory to create the strategy based upon the transport method which would likely have a switch statement to return the appropriate calculator.
public class CalculatorFactory {
public static ICalculator CreateCalculator(string transportType) {
switch (transportType) {
case "car":
return new CarCalculator();
...
public class CarCalculator : ICalculator {
public decimal Calc(double distance) {
return distance * 1;
}
}
....
You can make a Dictionary that returns a multiplier based on transport.
public class TransportationCostCalculator
{
Dictionary<string, int> multiplierDictionary;
TransportationCostCalculator ()
{
var multiplierDictionary= new Dictionary<string, int> ();
dictionary.Add ("Bicycle", 1);
dictionary.Add ("Bus", 2);
....
}
public decimal CostOfTravel(string transportMethod)
{
return (decimal) (multiplierDictionary[transportMethod] * DistanceToDestination);
}
I think the answer is some kind of database.
If you use some, the TransportCostCalculator ask the database for the multiplayer to the given transportmethod.
The database may be a text-file or an xml or an SQL-server. Simply a key-value-pair.
If you want to use code-only there is - tmo - no way to avoid the translation from transportmethod to multiplayer (or cost). So some kind of swicht is needed.
With the database you put the dictionary out of your code and you must not change your code to apply new transportmethods or change the values.
This is a case for the strategy design pattern. Create a base class, say TravelCostCalculator, then develop classes for each mode of travel you will consider, each overriding a common method, Calculate(double). You can then instantiate the specific TravelCostCalculator as needed using the factory pattern.
The trick is in how to construct the factory (without a switch statement). The way I do this is by having a static class constructor (public static Classname() - not an instance constructor) that registers each strategy class with the factory in a Dictionary<string, Type>.
Since C# does not run class constructors deterministically (like C++ does in most cases) you have to explicitly run them to ensure they will run. This could be done in the main program or in the factory constructor. The downside is that if you add a strategy class, you must also add it to the list of constructors to be run. You can either create a static method that must be run (Touch or Register) or you can also use System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor.
class Derived : Base
{
public static Derived()
{
Factory.Register(typeof(Derived));
}
}
// this could also be done with generics rather than Type class
class Factory
{
public static Register(Type t)
{
RegisteredTypes[t.Name] = t;
}
protected Dictionary<string, Type t> RegisteredTypes;
public static Base Instantiate(string typeName)
{
if (!RegisteredTypes.ContainsKey(typeName))
return null;
return (Base) Activator.CreateInstance(RegisteredTypes[typeName]);
}
}
I prefer to use Enum for that like this:
public enum TransportMethod
{
Bicycle = 1,
Bus = 2,
Car = 3
}
And use it like this method:
public decimal CostOfTravel(string transportMethod)
{
var tmValue = (int)Enum.Parse(typeof(TransportMethod), transportMethod);
return DistanceToDestination * tmValue;
}
Note that above method is case-sensitive, So you can capitalize first char;
Related Answer
It was said before but i want to give related topic another shot.
This is a good example for reflection.
"Reflection objects are used for obtaining type information at runtime. The classes that give access to the metadata of a running program are in the System.Reflection namespace."
By using reflection, you will avoid compiling code if another switch type such as train is wanted to add the program. You will solve the problem on the fly by using a config file.
I recently solved a similar problem with strategy patttern, by using dependency injection but I still end up with switch statement. It doesnt solve your problem this way. Method suggested by tyson still needs recompile if a new type added to dictionary.
An example of what i am talking about:
Dynamic Loading of Custom Configuration XML using Reflection in C# :
http://technico.qnownow.com/dynamic-loading-of-custom-configuration-xml-using-reflection-in-c/
Define a look up table array 3 by 2.
Look up rate value in array cell adjacent to transport type.
Calculate cost based on rate.

.Net arbitratry runtime class instantion and method calling

I am looking for a way to do arbitrary class instantion as well as attribute assignement and possibly method calling in .Net and preferrably C#. Since arbitrary is too broad a word let me tell you what I am after.
Let's say I have a DLL (objects.dll) that contains:
public class Person
{
// Field
public string name;
// Constructor that takes no arguments.
public Person()
{
name = "unknown";
}
// Constructor that takes one argument.
public Person(string nm)
{
name = nm;
}
// Method
public void SetName(string newName)
{
name = newName;
}
}
public class Table
{
// Field
public int width;
public int lenth;
public int height;
// Constructor that takes no arguments.
public Table()
{
width = 0;
length = 0;
height = 0
}
// Constructor that takes three arguments.
public Table(int w, int l, int h)
{
width = w;
length = l;
height = h;
}
// Method
public void SetWLH(int w, int l, int h)
{
width = w;
length = l;
height = h;
}
}
public class Printer
{
public Printer(){}
public void printAPerson(Person p)
{
//do stuff with p
}
public void printATable(Table t)
{
// do stuff with t
}
}
I want to be able to instantiate either of the classes above, set attribute values and call methods at runtime from a different program in the most generic possible. eg. lets say I hame a programm called myprog.exe, i want to be able to do the following
myprog.exe objects.dll Person name testname Printer printAPerson
where:
objects.dll is the dll that contains all required classes
Person is the first I will instantiate name is its attribute
testname is the value I will assign to this attribute
Printer is the class I will use for printing
printAPerson is the method in the Printer class I need to call with the specified object as a parameter.
As you can see, in the best case for my use scenario, neither of the objects and classes are/will be known at compile time so I would like to be as non-casting as possible. If that is not possible I will take what I can.
I have seen this, How to use reflection to call a method and pass parameters whose types are unknown at compile time?, which to my limited knowledge kind of does what I want minus the casting bits or I could be mistaken.
Thanks a lot!
Instead of using Reflection you could use dynamic. But this requires that the Printer class and others are changed. And you would loose intellisense and compile time checks.
public class Printer
{
public Printer() { }
public void printAPerson(dynamic p)
{
//do stuff with p
Console.WriteLine("Person name: " + p.name);
}
public void printATable(dynamic t)
{
// do stuff with t
Console.WriteLine("printATable(Table p) is called");
}
}
public class TestDynamic
{
public static void Test()
{
// To get the type by name,
// the full type name (namespace + type name) is needed
Type personType = Type.GetType("StackOverflowCodes.Person");
object personObj = Activator.CreateInstance(personType);
// Implicit cast to dynamic
dynamic person = personObj;
person.SetName("Alan Turing");
Type printerType = Type.GetType("StackOverflowCodes.Printer");
object printerObj = Activator.CreateInstance(printerType);
dynamic printer = printerObj;
printer.printAPerson(personObj);
}
}
Are you flexible concerning your executable input format? If so, you could do what you want by having a convention. I would do this using a JSON structure like this one:
{
Command : "",
Arguments : {
Argument1 : 0,
Argument2 : { }, // can be another complex object
Argument3 : [] // an empty array maybe ...
}
}
Where Command would be something like "ClassName.MethodName", Arguments will be a JSON object that each object property represents your method parameter.
In your executable, you must parse this JSON using a library (example http://www.newtonsoft.com/json) and use reflection to deserialize every JSON object parameter and call your method. If you cannot get it work, please let me know I will try to make an example (if I will have time, this night because I am at work right now).
For your case you just want to print an object of type Person to the printer right? You could execute a command like this:
{
Command : "Printer.PrintAPerson",
Arguments : {
p : { name : 'george' }
}
}
If you want to rely on a standard protocol, please check the JSON-RPC protocol: http://json-rpc.org/wiki/specification

C# can an inherited method or property use the derived class members without creating a new method?

I'm coding a simple game using C# to help me learn basic object oriented concepts.
In this code below:
class entity
{
int hp;
string name;
public entity()
{
hp = 1;
name = "entity";
}
public string status()
{
string result;
result=name + "#" + " HP:" + hp;
return result;
}
class dragon : entity
{
new public string name;
new int hp;
public dragon()
{
hp = 100;
name = "Dragon";
}
}
I made an object for "Dragon" as such
dragon mydragon = new dragon();
The problem is with the following code:
mydragon.status();
This returns a string but with the "name" and "hp" of the entity class object (i.e. hp=1, name=entity).
I'd like to have this return the dragon object's values (hp=100, name=dragon). I'm not sure what I'm doing wrong but it seems dead simple.
After fiddling and struggling for hours, the only solution I could come to was to simply copy & paste the status() method over to the dragon class. But I'm sure there's a better way to do this.
Many thanks in advance.
Simply decorate fields hp and name in the class entity with protected access modifier. With that, they will be available to the dragon class as well and you won't have to redefine them. You can keep the dragon's constructor as it is, since it will run after the constructor in entity class, thus overriding values of its fields.
It could look like the following:
public class Entity
{
protected int hp;
protected string name;
public Entity()
{
hp = 1;
name = "entity";
}
public override string ToString()
{
string result = name + "#" + " HP:" + hp;
return result;
}
}
public class Dragon : Entity
{
public Dragon()
{
hp = 100;
name = "Dragon";
}
}
It is customary for names of classes in C# to begin with uppercase letter. Also, for stuff like returning string representation of a class, the ToString() method is usually overriden.
I'd add virtual keyword in entity class to the status method and override in each inherited class.
edit: Nikola's code looks also very fair if you want to use just .ToString() instead of Status()
Make the following changes...
class entity
{
protected int hp;
protected string name;
...
class dragon : entity
{
// new public string name; - you're creating new variables hiding the base ones
// new int hp; - ditto. Don't need them
....

How do I get the value of the used parameters in a constructor (C#)

I've got a question about getting the values from a constructor in a generic way.
namespace myTestNamespace
{
Public Class myTestClass()
{
Public myTestClass(int myInt,bool myBool, double myDouble)
{
//do / set something
}
Public myTestClass(int myInt,bool myBool)
{
//do / set something
}
}
}
Using (what you need);
Using myTestNamespace;
namespace MyIWannaLookForTheParametersName
{
Public Class MyLookUpClass()
{
Public void DoSomething()
{
List<object> myList = new List<object>();
myTestClass _ myTestClass = new myTestClass(1,true,2.5);
object mySaveObject = myTestClass;
mylist.Add(mySaveObject);
//how do I get the info from the right constructor
//(I used the one with 3 parameters_
//what was the value of myInt, myBool and myDouble
//how can I make it generic enough, so it will work with other classes with
// different constructors ass well?
}
}
}
Questions about intent aside, there's no generic way for you to do this. Information about what methods have been called and what values were supplied is not saved automatically. You are, of course, perfectly able to keep track of these things yourself, but you would have to write each class to do this explicitly.
Doing this in a generic way is asking for trouble. What if I did this?
public class Foo
{
public string Name { get; set; }
}
public class Bar
{
public Bar(Foo foo)
{
// ...
}
}
Then suppose I called it in this way:
Foo f = new Foo();
f.Name = "Jim";
Bar b = new Bar(f);
f.Name = "Bob";
Now, if such a generic system existed, what would be the value of foo for the Bar constructor? Either it reports "Bob" (which is what the value for Name is on the instance of Foo that was supplied), or it reports "Jim", meaning that the runtime or library would essentially have to be smart enough to make a deep copy of the object so that the state is not changed.
The bottom line is this: if you need access to the parameters passed to the constructor (or any other function), you'll have to store them somewhere explicitly.
You can't get thevalues from the constructor. You need to first place them in a property or a field within your class. The example you provided is a poor use of generics. You wouldbe better off placing the constructor values into properties and creating an interface with those properties.
I got what I needed with this method:
private static ParameterSettings[] GetListOfParametersFromIndicator(object indicatorClass, int loopId, myEnums.ParaOrResult paraOrResult)
{
return (from prop in indicatorClass.GetType().GetProperties()
let loopID = loopId
let Indicator = indicatorClass.GetType().Name
let value = (object)prop.GetValue(indicatorClass, null)
where prop.Name.Contains("_Constr_")
select new ParameterSettings { ParaOrResult=paraOrResult, LoopID= loopId, Indicator= Indicator, ParaName= prop.Name, Value= value }).ToArray();
}
where ParameterSettings is:
public struct ParameterSettings
{
public myEnums.ParaOrResult ParaOrResult { get; set; }
public int LoopID { get; set; }
public string Indicator { get; set; }
public string ParaName { get; set; }
public object Value { get; set; }
}
This info is ok for me. Thanks for the replies.
Regards,
Matthijs

Categories

Resources