Hi There...
Please, in C#, what I need to myself starts the constructor in my plugin?
for example...
I need start the constructor with a parameter..
public LCDSmartie(string cod)
and so... when you call the first function, I need to send one parameter, like this:
public string function1(string param1, string param2)
{
this(param1);
// code, bla, bla..
}
Can I do this? Can I myself start a Constructor?
Thanks!
Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
C# Constructors...
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Plugin Author
- Posts: 71
- Joined: November 22nd, 2005, 7:12 pm
- Location: Curitiba, Paran?, Brazil
-
- Plugin Author
- Posts: 37
- Joined: March 30th, 2006, 1:50 pm
- Contact:
-
- Plugin Author
- Posts: 71
- Joined: November 22nd, 2005, 7:12 pm
- Location: Curitiba, Paran?, Brazil
Sure, but I need to use a parameter sended by user in constructor!
I change the constructor by private void init(string cod).
But every time that the smartie calls this DLL, Will be used a new place in memory, isn?t?
What I have now...
public LCDSmartie() {}
public string function1(string param1, string param2)
{
init(param1);
}
private void init(string cod)
{
sr = new StreamReader(file, Encoding.GetEncoding(cod));
// code...
}

I change the constructor by private void init(string cod).
But every time that the smartie calls this DLL, Will be used a new place in memory, isn?t?
What I have now...
public LCDSmartie() {}
public string function1(string param1, string param2)
{
init(param1);
}
private void init(string cod)
{
sr = new StreamReader(file, Encoding.GetEncoding(cod));
// code...
}
