|
Fair enough but I think of NaN as being the numerical equivilent of null and the following is true
Object o1 = null;
Object o2 = null;
o1 == o2;
|
|
|
|
|
I got your point of view but from a mathematical point of view the framework is absolutely right.
|
|
|
|
|
Hi,
I got a service. I am trying to monitor the data on that service using the perfmon tool of windows XP.
I checked the log file of that service, the data collected is 0 for all the performance counters.
I am having these performance counters: Average Response time, Number of Requests, Number of Requests per second.
Can anyone help me, how to monitor and collect the data on that service.
Thank you.
ftht
|
|
|
|
|
This is my code in C#.The database i am trying to access is having 49 entries in NotesdataTable sequentially(1 to 49).When i check ,i get the entry at first row, first column as 23 when the expected one is 1.
string s="";
int i,j;
string path=Application.StartupPath;
conn=new OleDbConnection("FILE NAME="+path+"\\itskiosk.udl");
adpt=new OleDbDataAdapter("Select * from NotesDataTable",conn);
DataSet dataset=new DataSet();
adpt.Fill(dataset,"NotesDataTable");
MessageBox.Show(dataset.Tables["NotesDataTable"].Rows[0][0].ToString());
What is the problem. If any body has any idea pl let me know.
Thank you.
world of intelegence
|
|
|
|
|
Try adding "ORDER BY [Column]" to your select statement
|
|
|
|
|
tahnks it is working properly know
|
|
|
|
|
check the table name that u have mentioned in C# code with the one u created
in Database.
I observed a mismatch between those two from ur query.
u might have done...
NotesdataTable in Database
NotesDataTable in C# code.
check it
venkat
|
|
|
|
|
Hi,
I want to complie my application become exe file.
Please help me.
Thanks.
|
|
|
|
|
Select Console or Winforms Application if you are using VS .NET or give the /target:winexe (GUI) or /target:exe (Console) if you are using the command line compiler.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Tran,
For a windows application, you may use:
csc /t:winexe /out:./WindowsApplication1.exe Class1.cs
For a normal console application, you can use:
csc /t:exe /out:ConsoleApplication1.exe Class1.cs
Alternatively, as the other poster has suggested, you may directly select the appropriate application project type in Visual Studio .NET New Project Dialog.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
Hello everyone. Is there a way to export Outlook contacts from the Exchange server? I have written some code to extract the contact information through the local Oulook;however, I find it rather diffucult to apply this to the exchange server 2003. I need to export all contacts.
The reason behind this is we are making a white list at work to allow incomming emails, the problem is we have to assign someone in IT to manually export our executives contacts on a weekly basis to produce this white list.
Is there anyway around this?
thanks in advance
|
|
|
|
|
What might be the easiest way to remove all non-alphanumberic values from a string?
|
|
|
|
|
|
I am not that familar with RegEx. Can this been done with one replace call? Do you have an example?
|
|
|
|
|
This seems to work fine for me
string x = "123ABCD;233-";
x = System.Text.RegularExpressions.Regex.Replace(x, @"[^\w]", "");
This prints 123ABCD233;
You can Google for regexes that match more/less characters as you want.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks.
That was exactly what I was looking for.
|
|
|
|
|
Hi,
My program generates a log file for every event that happens in the program. So, I open the file and keep it open till the end. This is how I open the file for writing:
<br />
public CLogHandler()<br />
{<br />
this.m_fsLog = new FileStream(strTodaysLogFile, System.IO.FileMode.Append, System.IO.FileAccess.Write, System.IO.FileShare.Read);<br />
this.m_swLog = new StreamWriter(this.m_fsLog);<br />
if(this.m_swLog != null) this.m_swLog.AutoFlush = true; <br />
}<br />
<br />
pubic WriteLogMessage()<br />
{<br />
if(this.m_swLog != null) this.m_swLog.Write("[" + DateTime.Now.ToString("HH:mm:ss") + "] " + aMsg + Environment.NewLine);<br />
}<br />
One of the requirements is to display the current log file contents in a child form. So, I open the log file for reading like this :
<br />
System.IO.FileStream fs = new FileStream(this.m_strCurrentFileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);<br />
System.IO.StreamReader sr = new StreamReader(fs);<br />
<br />
while(sr.Peek() > -1) this.DisplayLogText(sr.ReadLine() + Environment.NewLine);<br />
<br />
fs.Close(); <br />
As you see, when I open the file for writing, I'm granting FileShare.Read, which means other processes can open the file for reading. But when I try to open the file for reading, it gives IOException that the file is being used by another process.
So, how can we write and read to and from a file simultaneously in the same program (ofcourse, without stopping the write process)??
Cheers
CNU
|
|
|
|
|
The title says it all. I need to know if there is anyways to make a "copy" of a reference type.
So basically i want to know if there is a way to make a Reference Type variable act like a value type variable.
Or is the only way copy a reference type is to create a new one and then move all the info out of the old one into the new
Thanks for your help!
|
|
|
|
|
It depends on the class of the variable. Some classes define a constructor that take another instance of the same class as a parameter. There's also a MemberwiseClone method, but note it's a protected method. Take a look at the ICloneable interface too.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
YawgmothIII wrote:
Or is the only way copy a reference type is to create a new one and then move all the info out of the old one into the new
That's how you do it. However, there are many ways to do that,
1. You can use MemberwiseClone.
2. Your object can implement ICloneable, implement the Clone method and do the copying there
3. You can use a nifty trick, serialize and deserialize the object back, you'll get a new copy and .NET handles all the copying for you.
private object Copy(object original)
{
using (MemoryStream ms = new MemoryStream())
{
BinaryFormatter fs = new BinaryFormatter(original.GetType());
fs.Serialize(ms, original);
return fs.Deserialize(ms);
}
}
Regards
Senthil
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
3.
As I think he doesn't know serialization very well I would add the info that the class being copied needs to be marked as Serializable or implement the ISerializable interface.
|
|
|
|
|
int intJ = (int) o;
where o is an onject of Integer kind
venkat
|
|
|
|
|
1)To personalize the uninstall icon that is showed in install/uninstall programs, how i can do?
2)I need to make more "xp styled" the install wizard forms, for example the progress-bar is flat style, i want to see the xp one. How? Some button is much big, i want to reduce. how?
3)if i make right-click on the desktop shortcut for my application .exe and i go in property window, i can see the Destination target but the button "Find Destination" is disabled, why?
|
|
|
|
|
1)To personalize the uninstall icon that is showed in install/uninstall programs, how i can do?
You have to provide icon file in setup project properties.
- ashish
|
|
|
|
|
Sasuko wrote:
2)I need to make more "xp styled" the install wizard forms, for example the progress-bar is flat style, i want to see the xp one. How? Some button is much big, i want to reduce. how?
You can do
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
For more information, look here[^].
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|