User Profile
Collapse
-
Charp replied to C#: Object to string array. [*] to [] error (Knowing both VB.NET as well as C# helps)in C SharpI was using RsiOPCAuto.dll library if you are curious an want to mess around with it yourself. I'm sure you can find it somewhere on the net. -
Double extensions when compressing file with c# (*.GZip)
I have an application that saves data to a MS Access database and then compresses it. The annoyance here is that I get a double extension on my zip folder. (*.accdb.gz).
I have come up with an alternative but it causes the compressed file to not get any extension at all. The problem is that I name both the folder and the file in the same line and I'm wondering if there's a way to seperate them.
Code:private void CompressFile(string
-
Charp replied to C#: Object to string array. [*] to [] error (Knowing both VB.NET as well as C# helps)in C SharpYeah, Plater, I know. That line gives me the [][*] error again though.Leave a comment:
-
Charp replied to C#: Object to string array. [*] to [] error (Knowing both VB.NET as well as C# helps)in C SharpI tried that and it did not work, instead i had to use the following code:
IEnumerable<str ing> oOPCList;
oOPCList = ((Array)(object )oOpcServer.Get OPCServers()).C ast<string>();
I also had to change the for loop to a foreach loop:
foreach (var item in oOPCList)
cboServer.Items .Add(item);
The strange cast first to object, then to Array, and then to IEnumerable<str ing>...Leave a comment:
-
Charp started a topic C#: Object to string array. [*] to [] error (Knowing both VB.NET as well as C# helps)in C SharpC#: Object to string array. [*] to [] error (Knowing both VB.NET as well as C# helps)
Hi, I have been assigned to Convert a VB.NET project to C# and I got stuck. I am using a class called RsiOPCAuto, but I don't think that I'll have to go into to much detail into explaining how it works. Let's just get on with my issue.
So basicly what i do is grabbing an object from my class using this code:
Code:public partial class FrmPartialMain : Form { RsiOPCAuto.OPCServer oOpcServer; public FrmPartialMain()
No activity results to display
Show More
Leave a comment: