|
Depends on whether this is an activex dll or a .Net dll.
If its Activex, you need to import it - Importing and Extending ActiveX Controls in .NET[^].
.Net dll - just add reference, select this dll, instantiate this class and you will have access to public methods.
|
|
|
|
|
If the DLL contains a class, you need an extra step to call its member functions: You can create a wrapper class that creates one instance of the DLL's class on initialization, and frees it when done.
Calls to the wrapper-class methods just forward that call to the method of the same name in the single DLL-class instance.
To access the DLL, use (for example) this type of declaration:
[DllImport("ComGUIProxy.dll", EntryPoint = "InitializeContainer")]
public static extern bool InitializeContainer(int hContainer, int TicketID);
And put the DLL in the same folder as your executable.
|
|
|
|
|
plz help me how to create installer for windows application
|
|
|
|
|
|
|
|
string laceStrings(const string& s1, const string& s2)
{
if (s1.empty())
return s2;
if (s2.empty())
return s1;
string laced;
laced.resize(s1.size() + s2.size());
int i = 0, pos = 0;
int size = std::min(s1.size(), s2.size());
for ( ; i < size; ++i)
{
laced[pos++] = s1[i];
laced[pos++] = s2[i];
}
if (s1.size() >= s2.size())
for ( ; i < s1.size(); ++i)
laced[pos++] = s1[i];
else
for ( ; i < s2.size(); ++i)
laced[pos++] = s2[i];
return laced;
}
|
|
|
|
|
Sorry, but that's not how it works. We're not here to do your work for you. We'll help if you've got a specific question or problem.
|
|
|
|
|
{
("Let me see your code sir");
}
|
|
|
|
|
Adding to Dave's comment, you are asking a question about C++ and Python in a C# forum. That's not very clever.
|
|
|
|
|
|
Next time use Google & find write forum before posting questions.
Found this one[^] from Github. And alternatively you could Code Rewrite[^]
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
List<DateTime> dtArray1 = new List<DateTime>();
List<DateTime> dtArray2 = new List<DateTime>();
Console.WriteLine("START Enter date");
for (int i = 0; i <= 2; i++)
{
string sStartdate1 = string.Empty;
sStartdate1 = Console.ReadLine();
DateTime dStartDate1;
if (DateTime.TryParse(sStartdate1, out dStartDate1))
{
dtArray1.Add(dStartDate1);
}
}
foreach (var item in dtArray1)
{
Console.WriteLine(item);
}
Console.ReadLine();
Console.WriteLine("end Enter date");
for (int j = 0; j <= 2; j++)
{
string sStartdate2 = string.Empty;
sStartdate2 = Console.ReadLine();
DateTime dStartDate2;
if (DateTime.TryParse(sStartdate2, out dStartDate2))
{
dtArray2.Add(dStartDate2);
}
}
foreach (var item in dtArray2)
{
Console.WriteLine(item);
}
Console.ReadLine();
}
}
}
|
|
|
|
|
|
int[] id1 = { 44, 26, 92, 30, 71, 38 };
int[] id2 = { 39, 59, 83, 47, 26, 4, 30 };
IEnumerable<int> both = id1.Intersect(id2);
foreach (int id in both)
Console.WriteLine(id);
/*
This code produces the following output:
26
30
*/
but how to compare with their index ,i mean i should compare id1[index0] with id2[index0] and each index if there will be intersection show result and of course result will be 0 because there not intersection with their index
|
|
|
|
|
Intersection does not work on index.
It works on values.
|
|
|
|
|
int[] id1 = { 44, 26, 92, 30, 71, 38 };
int[] id2 = { 44, 59, 83, 47, 26, 4, 30 };
hmmmm ok,if that,what i should do to get output 44
i want to compare 2 array element ,and if in the same place(which are in same index ) array are equal to show as result
|
|
|
|
|
You can customize your search (intersection) criteria without too much difficulty.
Override IEqualityComparer<T> .
Go through the example given here[^] on msdn.
|
|
|
|
|
This is not very "elegant" code, but I think you may be looking for a solution as simple as this:
int[] id1 = { 44, 26, 92, 30, 71, 38 };
int[] id2 = { 44, 59, 83, 47, 26, 4, 30 };
List<int> matches;
private void button1_Click(object sender, EventArgs e)
{
int[] shortAry;
int[] longAry;
matches = new List<int>();
if (id1.Length < id2.Length)
{
shortAry = id1;
longAry = id2;
}
else
{
shortAry = id2;
longAry = id1;
}
for (int i = 0; i < shortAry.Length; i++)
{
if (shortAry[i] == longAry[i]) matches.Add(shortAry[i]);
}
} When you exit this Button ClickEventHandler, then, if matches.Count == 0, there are no matches.
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
Try the Zip method[^]:
int[] id1 = { ... };
int[] id2 = { ... };
IEnumerable<int> both = id1.Zip(id2, Tuple.Create).Where(t => t.Item1 == t.Item2).Select(t => t.Item1);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I need save to file User Names from this web: http://worldoftanks.eu/community/clans/500027296-BERU/#wot&mt_order_by=-name
I have tried this with WebClient, WebBrowser, SHDocVw.WebBrowser etc. and nothing work because in downloaded html page code has not filled that informations, what I need. As I undersrand they are showing via AJAX or somethig like this.
WebBrowser has method ShowSaveAsDialog, but I need WITHOUT this dialog
Could someone help me?
P.S. Sorry for my bad english.
|
|
|
|
|
You can use HttpWebRequest to save a file.
Here[^] is an exanple that saves an excel file.
|
|
|
|
|
This also didnt work.
That data are not in the saved document.
|
|
|
|
|
|