|
Boroumandan wrote: I would be very thankful if anyone provide me Sample.
This isn't how the site works. People don't do your work for free.
What research have you undertaken to solve your problem? What code have you already tried to write?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi guys ....im just intresting in serial port programming one simple one i want try now just connecting one gang way switch to PC via serial port.
method:
when switch was pressed, application should display "switch has been pressed"
any ideas ?
so much of happy ending...
|
|
|
|
|
if u r using VS 2005 you will find SerialPort Control in the toolbox.
just added it and specify it is com number and bouadrate then open it and read
|
|
|
|
|
I found a good example about serial port in this link, you can use it:
http://www.codeproect.com/KB/cs/serialcommunication.aspx
Sourie
|
|
|
|
|
Hi,
How do i display the select names dialog box in outlook 2003 in my program. The same can be achieved in Outlook 2007 by using the SelectNamesDialog.
Please advice.
|
|
|
|
|
Hi all,
I just want to add several controls at runtime like dropdown list, text box abd button. And, when we click the button again one row will be added with the set of controls likewise.can anyone please help me?
Thanks in Advance.
Thanks & Regards,
Radha
|
|
|
|
|
Duplicate Post
Please Check the answer in Asp.Net Forum !!!
|
|
|
|
|
Sorry.. I m new to this one.So, i m not sure whether to post this in C# or Asp.net.. So i did post in both discussions.
Thanks & Regards,
Radha
|
|
|
|
|
I think now you know which is the right fourm to post which Topic
|
|
|
|
|
Hi everybody, recently i have big problem of software development
my Question is that.
- How to call Dot net Web-Services in php/Java ?
Advance Thank
|
|
|
|
|
Please don't cross post. It's rude
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
static public void ToFile<t>(T[] vec, string name) where T : IEnumerable<t>
{
using (StreamWriter sw = new StreamWriter(name))
{
foreach (T v in vec)
sw.WriteLine("{0}", v);
}
}
Now to call that function with:
double[] vec = { ...some numbers ... };
ToFile.(vec, "filename.txt"); <---- error double[] sould be IEnumerable
chesnokov
|
|
|
|
|
You can't do that. You've constrained T to be enumerable, but T in your example is double and not an array of doubles.
|
|
|
|
|
it is ... T[] vec ... if this is what you meant.
How to do it any way?
chesnokov
|
|
|
|
|
Well, in your example, the compiler will map to double, and that will break the T:IEnumerable constraint. I guess you simply want the first parameter to be enumerable, in which case,
static public void ToFile(T vec,string name) where T : IEnumerable
{}
will work. Or, if you want to ensure that the caller passes an array of T, you could do away with the constraint, arrays are always enumerable.
|
|
|
|
|
I need to use the code like:
int[] vec1 = ...
double[] vec2 = ...
etc...
ToFile(vec1, "file1.txt");
ToFile(vec2, "file2.txt");
If you remove 'where T : IEnumerable' the foreach statement will not compile, if you keep 'where ...' the ToFile(vec, "filename") will not compile
Would you provide here your modification of ToFile() that compiles along with its invocation with vec1, vec2, etc...
chesnokov
|
|
|
|
|
Huh? Did you actually try removing the constraint? This code compiles fine on VS 2005.
static void ToFile<T>(T[] t, string name)
{
foreach (T val in t)
{
}
}
static void Main()
{
int[] intArray = { };
double[] dArray = { };
ToFile(intArray, "a");
ToFile(dArray, "a");
}
|
|
|
|
|
I am using Outlook 2003 and i want to make my own add in components to Outlook. So in my application, when i click a button, I want to be able to display the outlook address book and be able to select the contacts from the Address book and populate those selected names in my add in component.
How do I achieve the same?
Thank you
|
|
|
|
|
Hi All,
There is the requirement to read Excel file and store data in a datatable for my web project. I am using C# language.
My code is written below
String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + excelFile + ";Extended Properties=Excel 8.0;";
objConn = new OleDbConnection(connString);
objConn.Open();
OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [" + excelSheetName.Trim() + "]", objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
objAdapter1.Fill(dt);
The above code returns data to a data table, but the problem is to read formated Excel sheet. Suppose there is a formula field, it doesn't store the actual value. It stores some different value.
What other method to read the excel file? I am not using COM component of Excel to read as it is a web project. There may be a security problem after deployment.
Thanks in Advance.
|
|
|
|
|
Please don't cross post. It's rude
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi friends I want to create a oracle Stored Procedure that stores data in table Employee_Info which is in a dataBase that is named Garmrnts. But I d not know how to create a stored procedure that stores data. Oh! I want to access those procedure using C# & Oracleconnection. Can any one tell me how can I do that? Plz It will really help me a lot.
|
|
|
|
|
You may want to look around on Oracle's site or ask this in the SQL forum.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
|
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I created a setup for my small application using the click once deployment method.But I also want to execute another *.exe file in setup. i.e. I want to execute another *.exe file after the setup has been completed.
Do you guys know how to do it?
|
|
|
|