|
I have a remote object with one method that takes roughly about 10 minutes to finish. I created a Windows Service to host the remote object using TCPChannel, Binary formatter, and SingleCall. If I stop the service while a client has invoked the remote method I want the service to wait until the remote object is done doing its job. How do I control this behaviour?
|
|
|
|
|
Why C# instead of Visual Basic.Net? They both run at the same speed. People in the Code Project seem to encourage C# development but not VB.Net. Why?
|
|
|
|
|
I think it's really a matter of taste, probably depending on what you started programming with.
People with a C/C++ background are likely to use C# because of the similar syntax, while people who were doing VB/VBA in the past are likely to use VB.NET IMHO.
mav
|
|
|
|
|
1. In actual fact, the C# compiler generates faster IL than the VB.NET compiler ( that's according to a pro VB.NET guy I got into a big argument with, so I doubt he'd say it without feeling sure it was true )
2. VB.NET is crap. I've had to use it a bit recently, and I am astounded by some of the terrible things it does or does not do. In fact, another pro VB guy told me that VB.NET originally was a good .NET language, and all the VB6 guys were up in arms about breaking existing code, so Microsoft had to turn it into a mess, and add various hacks to make it possible to write nice code in VB.NET, but of course everyone who uses it tends to use the old, bad VB6 syntax.
3. It has no future. Microsoft needed to keep supporting VB for now, but consider this. C# has been submitted to an external standards body, C# does not have a bad name ( VB is syonymous with people who can't program and bad code, right or wrong ), and Microsoft simply does not need to be pushing two languages. I doubt VB will be around for much longer.
4. C# was designed from scratch, VB had OO, etc. bolted onto the side of the worst language in history. Which is more likely to have been designed well ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
bolted onto the side of the worst language in history.
Oh really? Worse than Intercal[^]?
|
|
|
|
|
If two viruses exist, and virus A does the most damage, but virus B is infinitely more successful in propogating itself, so that virus A infects 3 machines world wide, and virus B infect 300,000, which one is worse ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Ahh.. you make a good point, although from another standpoint you could bring in all the stats of how many corporations were able to save money by hiring less knowledgeable Visual Basic (or even Java) programmers to do in-house stuff quickly and cheaply.
|
|
|
|
|
Assuming there was a case for this before, it's no longer true. C# is just as fast to develop in, in fact I find it faster, because the language does not fight me.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Actually, you're referring - it would seem - to VBScript (which I currently sustain), but VBScript itself is not the problem. It is merely a language that drives an engine (the Windows Script Host, for example) that calls into an automation server like Internet Explorer, which is what contains the problems to which you refer. Script itself has only had one security bulletin in several years, IIRC.
Besides, what could be worse than a language[^] you can't event see?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
What are the code sizes of the following?
IL_0000
IL_0002
IL_0006
or
IL_0000
IL_0002
IL_0003
IL_0007
How does one "add" it up. How does the IL_XXXX relate to the code size?
thanks for your time -
|
|
|
|
|
What do you mean by code size? Those are line labels.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Thanks for your reply.
Why then are they not sequential? Why for example does IL_0000 have IL_0003 next?
What makes the 'code size' the size it is?
|
|
|
|
|
Like the other post mentioned they are only labels. ILDASM names them with an offset hint, but it has no semantic value, and doesnt take up space. Try for yourself, insert a few nop calls at the beginning of the method with jumps, the result of both methods will be the same.
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
leppie- thanks for your reply
Why then are they not sequential? Why for example does IL_0000 have IL_0003 next and not IL_0002?
What makes the 'code size' the size it is?
|
|
|
|
|
|
Hello all,
i made a runtime dataset and trying to delet a row from this data set is it update the row index in the dataset?
Thanks
hay
|
|
|
|
|
Not sure if this is the answer your looking for but:
DataSet dSet = new DataSet();
//fill table called "MyTable" here...
dSet.Tables["MyTable"].Rows[x].Delete();
|
|
|
|
|
problem:
1)how to create an UDP server for multiple clients.use multithreading or something else?
2)how to send messages over UDP to many servers at the same time.
thanks
|
|
|
|
|
I have a windows application in c#. I am required to create an html file and save on a certain directory.
At the moment I am writing the file using streamwriter.
But I do have a problem with the images in the file in deployment.
I notice that I have available when I add an item to the project to add html page. Does anyone know if that can be dynamically altered? or anyone have a better way to add an html page?
thank you
tephra
|
|
|
|
|
drey1 wrote:
I notice that I have available when I add an item to the project to add html page.
Sorry tephra, could you make that clearer?
|
|
|
|
|
Just to test, I created a simple html page and inserted a gif image. I was able to view it in a browser.
However, at first view, I can not do anything else with it. It seams static. I do not know how I can dynamically add any thing to it.
I am not sure that is the right way to go for me. ie. I am trying to create an index html file with links to PDF files, and those files will always change. So the html has to be dynamic.
thank you
|
|
|
|
|
You need to use relative paths in your HTML file that you're writing. I suggest using the Microsoft way of doing it, which is what happens when you save a page from Internet Explorer using the default settings: the HTML page is saved to disk and a folder is created with the same name and "_files" appended. In that directory are all the files that can be resolved (images, script files, etc.). When the HTML file is saved the path to those linked files are changed to a relative path - relative to the document, like so:
filename_files/img1.gif
filename_files/img2.jpg
Try it. Save a document with images to disk and examine both the file and the folder with the same name.
Using the same convention is consistent with other applications that use MSHTML (including IE, Word, FrontPage, and more), as well as other third-party libraries that want to provide a consistent user interface. Windows XP and newer platforms also allow users to manage both the HTML file and related folder as a single unit.
How you alter it is by parsing the text as you write it and changing what gets written, then skipping that portion of the text you're writing. You could also modify it before saving. It really just depends on your requirements and if you can modify the in-memory document.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I would like to know the best approach for sending information or a message from a DLL file back to the EXE file. Right now, the way I do it is pretty lame. I want to either pass a function pointer (I guess they are called delegates in C#) that I can pass to the dll upon linking. Or set up some sort of message system. Its easy to call functions from a dll, but how to I do it the other way around (cleanly)
Right now, I have some pointer to some object which has some event --its really fugly.
Thanks
|
|
|
|
|
|