|
|
Do you want to capture the data through IP or through serial port ?
For IP see the reply from Divyang Mithaiwala.
For serial port, use this : http://www.compt.ru/
|
|
|
|
|
hi guys!
I'm a newbie to c#
Method signature: public static string Translate(string translationCode, string culture, ref Dictionary<string, Dictionary<string, string>> input)
I want to pass a dictionary by reference and not the entire object.
Is it correct to use 'ref' in the argument?
Then how do I insert the dictionary when calling the method?
thanks
|
|
|
|
|
Reference types (objects) are never copied when you use them in a call. It's always the reference to the object that is sent to the method.
If you use the ref keyword with a reference type, you will be sending a reference to the reference.
Parameters are always sent by value unless you specify the ref keyword. For reference types that means that the value of the referecne is passed to the method.
Example:
void Test(string a, ref string b) {
a = "1";
b = "2";
Console.WriteLine("a: " + a);
Console.WriteLine("b: " + b);
}
string x = "x";
string y = "y";
Console.WriteLine("x :" + x);
Console.WriteLine("y :" + y);
Test(x, ref y);
Console.WriteLine("x :" + x);
Console.WriteLine("y :" + y);
The output will be:
x: x<br />
y: y<br />
a: 1<br />
b: 2<br />
x: x<br />
y: 2
---
b { font-weight: normal; }
|
|
|
|
|
How can we generate help file in (c#)visual studio 2005.
Using NDoc utility or through any other method........
thanx in advance...
Regards
parvinder
|
|
|
|
|
how to save a dataset and its row to the sqlserverc
|
|
|
|
|
nsyogi wrote: how to save a dataset and its row to the sqlserverc
use dataadapter
|
|
|
|
|
Hi all,
Can i add constants to MessageBoxButtons enumeration...
either by overriding or by using unmanaged code.........
Did anyone come across this.............
|
|
|
|
|
What do you mean ?
Do you want a extra button available ?
Don't you also love the code?
|
|
|
|
|
Hello
I am also facing a problem with datatable. I have been using a class which inherits a dataset, datatables, and rows. When I delete a row from table, it leaves a blank row with row state deleted and from here the problem starts. Prior there was no problem with deleting the rows from DataGrid (which is bound to my datatable). I am using a binding source to bind the data. Searching rows in table by 'FindByid()'. I am removing the row by 'DataTable.RemoveTableRow(row)' the error message displayed is as follows...
System.InvalidOperationException: DataTable internal index is corrupted: '5'.
at System.Data.RBTree`1.RBInsert(Int32 root_id, Int32 x_id, Int32 position)
at System.Data.RBTree`1.RBInsert(Int32 root_id, Int32 x_id, Int32 position)
at System.Data.Index.RecordStateChanged(Int32 oldRecord, DataViewRowState oldOldState, DataViewRowState oldNewState, Int32 newRecord, DataViewRowState newOldState, DataViewRowState newNewState)
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean fireEvent)
at System.Data.DataRow.EndEdit()
Above that, this error message come after some runs, i.e when we remove the rows from table for some number of times.
Please can any one help me in this... I dont know the cause of this problem, neither the solution....
Thanks in advance.
Priya
|
|
|
|
|
hello everybody!
(1)
i want to play mp3 which is contained in a database, and i don't want to read the data, write it to the disk and play the file from disk. i just want to play it from memory directly.
How should i do?
(2)
i want to splite some mp3s into pieces,and each piece has different length.
is there any tools that can auto splite the files using the custom length showed in an index file, maybe use .lrc file?
thx and sorry for my poor English.
|
|
|
|
|
i have found a good tool to solve problem 2.
http://chinajuanbob.spaces.live.com/
|
|
|
|
|
Trying looking into MemoryStream and see if you can't feed that to whatever is playing the song.
|
|
|
|
|
what's your mean?
i can get blob of mp3, put it into database and get byte[] of it from db.the only problem now is how to play these byte[] without saveing them to a film on the disk, i just want to play mp3 on the fly~
http://chinajuanbob.spaces.live.com/
|
|
|
|
|
Hi,
What I have is a main form with several textboxes, one of which is filled by reading from a text file. The main form allows the user to load another form that allows the user to edit the file and then return to the main form after saving any changes.
What I would like is for the main form's textbox to be programatically refreshed when the user returns from the editing form. It's easy to have the user do something (click in the textbox for example) and have it updated but I would like it to happen automajically .
How can I go about having the edit form tell the main form to update itself when the edit form closes?
TIA for any suggestions.
Glen Harvy
|
|
|
|
|
If you open your edit form by calling ShowDialog simply put the update code behind this call as ShowDialog blocks execution until edit form is closed. Otherwise register an event handler to the Closed event of your edit form and put the update code inside.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks - much appreciated
Glen Harvy
|
|
|
|
|
hi all can anyone help me with detailed help or any aricles link that teaches functions that wil sort and filter a simple database in access format.. i have already make my application to navigate to next, previous, first,last. and also able to update, delete and add new entries..
this is actually my sch project and i really it to know how to sort and filter the database.. i will really yr help 
|
|
|
|
|
You can use OleDb to query the database and get all the rows. Once you have all the rows you can do every thing you nead with them : sorting and filtering (with a dataview) and adding, removing and updating rows through the datatable.
Search cp for articles relating all i've mentioned.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
ic wht u mean .. can u give me more detailed help as in example because im very new in c# .. really appreciate yr help
|
|
|
|
|
Hi,
I am installing some COM components with my C# application but what really happens is that every time on startup it tries to relocate the components and perhaps register them. How can i set the installer to register those components only once.
Regards,
Wasif Ehsan.
|
|
|
|
|
Hi All,
Greetings.I've to create a class file.Here i've added the coding what i've written.But its showing the error.Can any one tell me is this class correct and how to call in my .cs file.
public int AddEmployee(string employeeID,string employeeName,string Designation,string Machinetowork,string dateofbirth,string address,string city,string state,string zip,string phoneNo,string MobileNo,string email)
{
SqlConnection conn = new SqlConnection(conStr);
SqlCommand cmd = new SqlCommand("insert into Employee Values(@EmployeeID,@EmployeeName,@Designation,@MachineToWork,@DateOfBirth,@Address,@City,@State,@Zip,@PhoneNumber,@MobileNumber,@Email)",conn);
cmd.Parameters.Add("@EmployeeID",employeeID);
cmd.Parameters.Add("@EmployeeName",employeeName);
cmd.Parameters.Add("@Designation",Designation);
cmd.Parameters.Add("@MachineToWork",Machinetowork);
cmd.Parameters.Add("@DateOfBirth",dateofbirth);
cmd.Parameters.Add("@Address",address);
cmd.Parameters.Add("@City",city);
cmd.Parameters.Add("@State",state);
cmd.Parameters.Add("@Zip",zip);
cmd.Parameters.Add("@PhoneNumber",phoneNo);
cmd.Parameters.Add("@MobileNumber",MobileNo);
cmd.Parameters.Add("@Email",email);
int err=1;
conn.Open();
{
cmd.ExecuteNonQuery();
}
conn.Close();
return err;
}
Babu
|
|
|
|
|
ChennaiBabu wrote: But its showing the error
Standard Question #1: What is the error?
ChennaiBabu wrote: Can any one tell me is this class correct and how to call in my .cs file.
You have not shown a class, you have shown a single method.
You do not call a .cs file you intantiate classes then call the methods in the class
Might I suggest that you read a beginners book on C# because I get the feeling that if I attempt to answer you it will turn in to a very long thread that could easily be resolved if you just read some introductory information in C#
|
|
|
|
|
Colin Angus Mackay wrote: Standard Question #1: What is the error?
No, that is standard question #2.
Standard question #1 is:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
|