|
These are very good tools, I finally selected CLR profiler because of the lost cost.
Thanks a lot.
|
|
|
|
|
|
Hi,
I have an ftp application which is a VB application, which transfers files in a given directory of host machine to another machine.
I need to call this application from a C# windows service.
How can I do it? Its very urgent...
Thanks in Anticipation
|
|
|
|
|
hi all
I want to serialize a usercontrol and pass it thru web service. is that possible. if not how can we pass a usercontrol thru web services?
Rajanikanth A.B
|
|
|
|
|
Why don't you tell us what you are trying to accomplish, instead of asking how to do it the way that you think that it's done?
---
b { font-weight: normal; }
|
|
|
|
|
i want my usercontrol to se serialized(from web service) and sent as bytes and to be deserialized at the client machine.how to do it? can we serialize the usercontrol? how to maintain its state
Rajanikanth A.B
|
|
|
|
|
What Guffa meant is: Why are you wanting to serialise a usercontrol? It seems such an odd thing to want to do that your problem may be better solved a different way.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I want to multiplication like orderqty*rate=amount in c# datagrid windows appliction without using any button control when the cursor goes to the fild of amount inthe datagrid it should multiply the values given in the field of orderqty,rate if you need more description me ask me through email cutegirl_doctor@yahoo.co.in
I am a software developer in
c# dotnet located in bangalore india
|
|
|
|
|
You can use Datacoulumn.Expression property.
code from msdn
[CODE]
private void CalcColumns(){
DataColumn cPrice;
DataColumn cTax;
DataColumn cTotal;
DataTable myTable = new DataTable ();
// Create the first column.
cPrice = new DataColumn();
cPrice.DataType = System.Type.GetType("System.Decimal");
cPrice.ColumnName = "price";
cPrice.DefaultValue = 50;
// Create the second, calculated, column.
cTax = new DataColumn();
cTax.DataType = System.Type.GetType("System.Decimal");
cTax.ColumnName = "tax";
cTax.Expression = "price * 0.0862";
// Create third column.
cTotal = new DataColumn();
cTotal.DataType = System.Type.GetType("System.Decimal");
cTotal.ColumnName = "total";
cTotal.Expression = "price + tax";
// Add columns to DataTable.
myTable.Columns.Add(cPrice);
myTable.Columns.Add(cTax);
myTable.Columns.Add(cTotal);
DataRow myRow;
myRow = myTable.NewRow();
myTable.Rows.Add(myRow);
DataView myView = new DataView(myTable);
dataGrid1.DataSource = myView;
}
[/CODE]
|
|
|
|
|
I have a problem:
In VB.NET code: AddHandler m_PacketMonitors(i).NewPacket, AddressOf OnNewPacket
Legend: NewPacket is event, OnNewPacket is sub
So I want to convert this code to C#!
I tried many ways to convert but it didn't work!
Please help me this problem and explain how it works!
Thanks a lot!
Mai Duc Khanh
Senior of DaNang University, VietNam
|
|
|
|
|
In C# you need to know what type of delegate the vent needs. Assuming the the event delegate is named EventHandler (the default one for many events) the code would look like this:
m_PacketMonitors(i).NewPacket += new EventHandler(OnNewPacket);
Also note that the Visual Studio designer greatly helps. If you type until += the designer should automatically popup some stub with the correct delegate.
|
|
|
|
|
Thank you for your support!
Thanks a lot!
Mai Duc Khanh.
|
|
|
|
|
Hi,
I am using Windows Form (C# Express 2005) .NET 2.0
I have a background worker who always read an XML file and do some work. At the same time an user can open the same XML file, do some changes and save the XML file. Now, Some times My application is throwing XML file read error etc... when the backgroundworker conflicts the read and save process of XML. Can you please show me the way to lock the XML file so that they dont conflict, rather wait for the other thread finishes its work.
Thanks
|
|
|
|
|
|
Thanks for your reply.
the article looks not so simple. I thought some easy short snippet could do this work. Is not there any easy snippet available ?
|
|
|
|
|
The hard bit will be having an object visible to all code that accesses the file, so it can create the same lock. Beyond that, I didn't expect it to be too hard.
But yes, multi threaded code IS hard, at least, harder than single threaded.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have seen the nice feature of .NET 2.0 for sending email using SMTP, but i did not find any way to use SMTP with Authentication (user name, password). Can u please show me some way....
thanks
|
|
|
|
|
Hi guys.I want to create a function of form (a*x^+b*x+c/d*x^+k*x+m)in order so I can enter in two texboxes coefficients [a,b,c] and [d,k,m]and then use this function to plot a graph.But I dont know how to get values from the texboxes and use them? Anybody can show me any tutorial or link for similar problem?I would be very grateful.Best regards
|
|
|
|
|
double d = 0;
if (double.TryParse(textbox1.Text, d)
{
// d contains the double
}
else
{
// the text could not be converted to a double.
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to edit a cell. Currently I have a Edit button which makes 2 cell editable and then I update.
Is there a way I can double click on cell and make that cell editable and change the value.
rather theb Click on Edit then Update or Cancel.
Thanks
Thanks
|
|
|
|
|
Use DataGridView component (.NET 2.0)...
There is possible to attach event on a cell...
|
|
|
|
|
Hello,
Switching from version 1.1 to .NET 2.0 I have lost about 40% of speed of my calculations. To find out what is the reason I tried to change ArrayList to List<T>, foreach to for loop. It did not work in my case.
Refining my code I came to very simple example: for loop was under investigation.
a) Empty loop
M = 1000000000;
for (int i = 0; i < M; i++)
{
//do nothing
}
Running time in milliseconds: .NET 2.0 – 2921, .NET 1.1 – 718. .NET 1.1 is 4 times faster.
For loop contains two visible operations: increment i++ and comparison i < M.
b)To find out what is slowing the calculation I added increment inside the loop.
for (int i = 0; i < M; i++)
{
count++;
}
Running time in milliseconds: .NET 2.0 – 3484, .NET 1.1 – 1703.
Now the deference is not so huge.
c) Let us add comparison operation
for (int i = 0; i < M; i++)
{
if (count<M)
count++;
}
Running time in milliseconds: .NET 2.0 – 5828, .NET 1.1 – 2046.
The difference is increasing.
d) More comparison
for (int i = 0; i < M; i++)
{
if (i<M)
if (count<M)
count++;
}
Running time in milliseconds: .NET 2.0 – 7421, .NET 1.1 – 2721.
One can conclude that the slowing part is the primitive comparison operation.
Can somebody say what is going on?
Thanks,
Alex
|
|
|
|
|
hi friends
i am having a problem.I am not able to play wav/mp3 file in C#.
I downloaded an activeX component "RSP MP3 Player OCX 2.7.5" but it was in vb.I tried convert it into dll.but then also it had a problem. one of its method was
PlayFile(string path,ref bool wait).
Could anyone just tell me what is ref bool
or
from where i can get a wav file activeX control which can be used in C#.
please help me its really urgent.
thanx in advance.
nauty
|
|
|
|
|
nauty wrote: ref bool
is essentially a reference or pointer to a boolean data type.
nauty wrote: from where i can get a wav file activeX control which can be used in C#.
.NET 2.0 has one in the framework.
Ed
|
|
|
|
|
If you are .NET 2.0 System.Media.SoundPlayer is the class you need. It will only play wav files. It's very basic in functionality, but if you only need to play wav files, then it should do. E.g.
<br />
using System.Media;<br />
<br />
...<br />
<br />
SoundPlayer sound=new SoundPlayer(@"C:\Path To\WaveSound.wav");<br />
sound.Play();<br />
<br />
If you are creating lots of instances of SoundPlayer don't forget to call Dispose() or use "using"
Graham
-- modified at 16:51 Wednesday 5th April, 2006
|
|
|
|