|
A console application does not have a Windows message loop. You need to wait - for something. Your Main method just loads the class, then terminates.
BTW: When did you plan on calling UnInstall?
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
I would like to open a pdf file such as (Data mining.pdf).
But I only know how to create a pdf file and not to read it.
So please give me some suggestion how I can read a pdf file.
May Thu San
|
|
|
|
|
Hi,
This link is pretty good.
http://www.codeproject.com/csharp/MgPDFReader.asp
Regards,
Visala.
|
|
|
|
|
Hi,
I want to compare two xml files using C# code.I am having two files like abc.xml and cdf.xml..I want to compare the content of both files same or not.Please address me if any thing got idea.
Regards,
Visala.
visal k
|
|
|
|
|
one method: use this to load xml file into a dataset and then compare them.
DataSet ds=new DataSet();
ds.ReadXml("filename");
|
|
|
|
|
I need simple example please..Because I am new to C#..Could u please provide me sample example files and send me the code for comparision.Please
Regards,
Visala.
|
|
|
|
|
I have a server that exposes some classes through .NET Remoting.
If these classes have events, can the client subscribe them by simply using the usual syntax Event += new EventHandler(...), after getting a reference to the remote object?
Perhaps I'm asking an idiocy.
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Yes they can, and that is the beauty of remoting, you can use remote objects just like local ones.
You need to be aware of potential security exceptions though, because when the server fires an event, communication is happening in the opposite direction (when compared to a method call). Specifically, you'd need to set the typeFilterLevel[^] to allow two way communication. And of course, if your client is behind a firewall that blocks all incoming traffic, it's not going to get the events.
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
Thanks for your reply!
S. Senthil Kumar wrote: if your client is behind a firewall that blocks all incoming traffic, it's not going to get the events
I thought that, when you get an instance of the remote object, the network connection is kept open until you destroy it. Am I wrong?
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Yes, but you need a different socket connection for events, as the role is reversed i.e client becomes server and server becomes client, because it's the server that initiates the call.
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
any one know why the key down don't work?
thanks
|
|
|
|
|
because there is some bug in your code probably. paste us a snippet responsible for that...
|
|
|
|
|
Did you set the forms KeyPreview property to True?
Roy.
|
|
|
|
|
I have an array of bit values - well actually a bool array, 8 elements long. How can I convert this into it's byte representation?
So basically, I want to do a binary to decimal conversion. How can I do this?
/\ |_ E X E GG
|
|
|
|
|
Create a BitArray from the array of booleans and use the CopyTo method to store the value in an array of byte (with the size of one).
---
b { font-weight: normal; }
|
|
|
|
|
OK Thanks. I found a nice library on this site also...
/\ |_ E X E GG
|
|
|
|
|
If it's just an 8-bit to byte conversion this will do the job:
byte value = 0;
bool[] bits = { false, true, true, false, true, false, false, true };
for (byte b = 0; b < bits.Length; b++)
{
value <<= 1;
if (bits[b])
value |= 0x1;
}
This will also work if you change byte to int and increase the array length to a maximum of 32 boolean values
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
ok next q ... how do you access inputs into a constructor
within the base class?
my base class constructor:
protected int commonID; // this is common to all object
public BaseClass{
console.write commonID; // or something that accesses id
}
my sub-class constrictor:
public myClass(int id)
{
commonID = id;
}
but when I instantiate "myClass", before it sets commonID, it goes
to the BaseClass constructor. But commonID is null cause it hasnt
been set.
So is there a way for me to get "id" into the baseclass? or get commonID
set?
M
|
|
|
|
|
Here are your two constructors rewritten:
public BaseClass(int id)
{
commonID = id;
console.Write(commonID);
}
public myClass (int id) : base(id)
{
}
"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
|
|
|
|
|
dude, that was perfect, it worked.
thanks!
Moazzam
|
|
|
|
|
base class:
protected int commonID; // this is common to all object
public BaseClass{
}
public void DoOtherThing {
console.write commonID; // or something that accesses id
}
///////////////////////////////////////////////
sub-class:
public myClass(int id)
{
commonID = id;
DoOtherThing();
}
Was it a cat I saw?
|
|
|
|
|
But with this code the purpose of having the base class is somewhat lost as your method requires the subclasses to specifically call DoOtherThing() rather than properly inherite the behaviour of the base constructor.
"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
|
|
|
|
|
ADD button is the last control which i click in my page, after I click ADD button if I refreshed the page again ADD buttonEvent is being executed.I don't want this. How to avoid last event from execution when page is refreshed.
Srilakshmi
|
|
|
|
|
I think that's a standard behavior of Internet Explorer so that should be impossible to achieve your goal. But you can put a hyperlink to itself in each page and click it instead of click "Refresh".
Was it a cat I saw?
|
|
|
|
|
Workarounds
1. You can redirect user to someother page after clicking add button. Like "Thanks, values saved" is displayed on that page.
2. You can set an session variable, And increment that value, so if that value is set to 1, you can stop the value from entering into db.
|
|
|
|