Re: [DOTNET] Evaluate math expression strings?

2002-04-13 Thread Chris Farmer
I'm not sure what the "best" way is, but you could pretty easily write a helper class in JScript.NET to to this. JScript has the "eval" function which makes this kind of stuff easy. HTH, Chris -Original Message- From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Fan

Re: [DOTNET] Evaluate math expression strings?

2002-04-13 Thread Sills, Adam
As far as I know, there is nothing built-in that will do that (unless you want to dynamically create an assembly, class, method and return the object result of that (PITA if you ask me). You can also make a jscript dll like so: [eval.js] class EvalClass { function Evaluate(expression: St

[DOTNET] Evaluate math expression strings?

2002-04-13 Thread Aaron Fanetti
Does the framework have (or is someone willing to share :) ) a utility class to do this? Or will I need to build my own interpreter? Something like... int result = MyMath.Evaluate( "(10 / 2) * 3" ); Thanks, Aaron You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscri

Re: [DOTNET] Delegates referencing a Property

2002-04-13 Thread Ethan Smith
For a given property, the get method is named "get_" followed by the property name, and the set method is named "set_" followed by the property name. Using Delegate.CreateDelegate(), one can then synthesize a delegate against the property get or set method. Eg: System.Delegate.CreateDelegate(typ

Re: [DOTNET] AGAIN: How to define OUT parameter in Managed C++ interface for interop with C#?

2002-04-13 Thread Leon Finker
It should be same as pointer to an array. void Receive(/*...*/ unsigned char (*SampleData) __gc []) { *SampleData = new unsigned char __gc[10]; } /// unsigned char b __gc[]; Receive(&b); /// - Original Message - From: "Thomas Tomiczek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sen

Re: [DOTNET] Beginner-level ATL Server question

2002-04-13 Thread Leon Finker
Works good for me. Make sure COM is initialized. Call AfxOleInit(); Otherwise what error are you getting for hr - Original Message - From: "Tom Archer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 7:29 PM Subject: Re: [DOTNET] Beginner-level ATL Server question

Re: [DOTNET] Using XML/XSLT to generate WinForm reports

2002-04-13 Thread Ian MacLean
Steve Loughran wrote: >- Original Message - >From: "Erick Thompson" <[EMAIL PROTECTED]> >Sent: Friday, April 12, 2002 14:22 >Subject: Re: Using XML/XSLT to generate WinForm reports > > > >As an aside, Ant 1.5 (due to hit beta in a week or two) now has a >WsdlToDotnet wrapper round wsdl.ex

Re: [DOTNET] Braindead Winforms ComboBox

2002-04-13 Thread Ian MacLean
Brian G. Vallelunga wrote: > >Problem #1: >When in DropDown mode (not DropDownList) even you can select and >manipulate text with the keyboard (Shift+End to select, etc) the mouse >is inoperative. You cannot select text with the mouse. Maybe this is the >behavior of the stock Win32 combo, but it

Re: [DOTNET] Collection imperssination

2002-04-13 Thread Andreas HÃ¥kansson
Thank you for the url, I will check it out later tonight. Perhaps I should explain abit what I want to do to make things clear on what I need to do. My application is built on-top of a hierarchical object model and it also supports plug-ins. In the object model there might be a "collection" objec

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Axel Heitland
Yepp - that's what I was looking for. (1) I'm dragging it onto the form - otherwise it's ok to do some manual work (how else?). One question left: I do see that the form's dispose method get's called when I close it. Doesn't that imply that "something" is calling dispose on the form - and: does

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Ian Griffiths
If the component is being dragged on to the form from the toolbox, all you need to do is supply a constructor that takes an IContainer. If you then make that constructor call IContainer.Add, passing itself as the parameter, this will result in your component being added to the 'components' member

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Axel Heitland
Thanks Ramiro, that new to me - unfortunately it doesn't help in this case... I'm dragging a component (not a control) to a winform and I'd like the designer to generate not only the initialize calls (which it does), but additionally the shutdown (dispose) code. This works well for controls (t

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Ramiro
Axel, I'm not really sure about is what you need, but you can enforce the Dispose() call with the using keyword (C#) void SomeMethod() { ... using (SomeDisposableObject so = new SomeDisposableObject()) { } ... } which is identical to void SomeMethod() { ...

Re: [DOTNET] CollectionGen updated

2002-04-13 Thread Brad Wilson
Sam Gentile wrote: > Don't forget the color syntax highlighting! -)) Bah! Free editors do that. ;) I'm still trying to decide whether Intellisense is worth $100. :) :) Brad -- Read my web log at http://www.quality.nu/dotnetguy/ You can read messages from the DOTNET archive, unsubscribe from D

Re: [DOTNET] CollectionGen updated

2002-04-13 Thread Sam Gentile
Don't forget the color syntax highlighting! -)) Sam Gentile Co-Author Wrox Professional Visual C++.NET (ISBN 1861005962 ) [EMAIL PROTECTED] www.project-inspiration.com/sgentile http://www.project-inspiration.com/sgentile/DotNet.htm BLOG: http://radio.weblogs.com/0105852/ http://www.project-inspi

Re: [DOTNET] CollectionGen updated

2002-04-13 Thread Brad Wilson
Steve Loughran wrote: > Hey, does this mean you are starting to move beyond the IDE as the center of > the dev process? Woah, did I just feel the earth jostle slightly off path? :-p Chris loves to harass me about using NAnt and not owning VS.net. But Genghis is getting NAnt build files, and it'

[DOTNET] MemoryStream and Async I/O

2002-04-13 Thread David Buksbaum
Hello All, I was wondering if MemoryStream supports the stream async i/o (BeginRead and BeginWrite). The docs say that BeginXXX is implemented in terms of the synchronous model, so I assumed it would just work. I couldn't get it to work, and was hoping someone had an answer to this. Thank you Da

Re: [DOTNET] CollectionGen updated

2002-04-13 Thread Steve Loughran
- Original Message - From: "Chris Sells" <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 15:56 Subject: ANN: CollectionGen updated > Due to popular demand (for new features : ), I've updated CollectionGen > [1]. There are three major new features: > I also refactored a bit so that the

Re: [DOTNET] Using XML/XSLT to generate WinForm reports

2002-04-13 Thread Steve Loughran
- Original Message - From: "Erick Thompson" <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 14:27 Subject: Re: Using XML/XSLT to generate WinForm reports > I always thought that SVG was mainly an alternative to flash. I can see how > it could be used as a reporting language, but I still

Re: [DOTNET] Using XML/XSLT to generate WinForm reports

2002-04-13 Thread Steve Loughran
- Original Message - From: "Erick Thompson" <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 14:22 Subject: Re: Using XML/XSLT to generate WinForm reports > The ten foot pole comment wasn't meant to reflect on the quality of FOP > (which I have heard good things about), but more about th

Re: [DOTNET] Collections Editor question

2002-04-13 Thread Reggie Burnett
I seemed to have answered my own questino. Sorry if this qualifies for the obvious list but you don't have to implement your own collections class to implement a collection-based property on a control. Took me a bit to figure that out as most of the smaples I had seen had implemented a collecti

Re: [DOTNET] Goofy Question: What are "///" called?

2002-04-13 Thread Jeff Key
Ross, Check out NDoc at http://ndoc.sourceforge.net -- it will do it for you, or even put it into JavaDoc format if you'd like! It's a fantastic, very easy to use program that documents your entire public interface; those that have comments and those that don't. Enjoy! -jk -Original Messa

Re: [DOTNET] Goofy Question: What are "///" called?

2002-04-13 Thread Ross Lambert
Much thanks Jason, Jeff, et al. The "/doc comments" seem much akin to javadocs, only better (yes, I am Java programmer eating crow as I dig into C#). :-) I almost fell outta my chair when I saw them pop up in tooltips. That was very cool. I kept looking up "xmldoc" and variants to find docs. "D

Re: [DOTNET] StrongNameIdentityPermissionAttribute with Security. Demand Confus ion

2002-04-13 Thread Jason Bock
On Fri, 12 Apr 2002 16:45:52 -0600, Mike Woodring <[EMAIL PROTECTED]> wrote: I'm wondering if the issue with nothing showing up in .permissionset is due to the way the set is calculated. Take a look at this code: FileStream fs1 = new FileStream(@"d:\assembly\CallerA.snk", FileMode.Open); Stro

[DOTNET] AGAIN: How to define OUT parameter in Managed C++ interface for interop with C#?

2002-04-13 Thread Thomas Tomiczek
I have a function that looks like void Receive([Out, MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UI1)] out byte [] SampleData); In C# - this is, btw, a line out of a COM interop interface definiition. I cant use a TLBIMP here - no typelib defined for this, sadly. Now, I mo

[DOTNET] Components, Designer and Dispose

2002-04-13 Thread Axel Heitland
Hi all, I've implemented a simple component-derived class which is hosted on a windows form. For successfull shutdown the component needs a call to it's Dispose method at the end of it's lifetime; unfortunately the WinForms designer doesn't generate that code automatically so my users need write

Re: [DOTNET] C# to VB.NET Migration Tool?

2002-04-13 Thread Zane Thomas
Teo, Ooops, accidentally hit ctrl+enter http://www.aspalliance.com/aldotnet/examples/translate.aspx Zane You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.

Re: [DOTNET] COM Interop: Not seeing COM Interfaces in OLEVIEW after regasm?

2002-04-13 Thread Adam Nathan
Auto-dual interfaces used to be exposed by default in Beta 1 since they're convenient, but this was changed solely for versioning concerns. Auto-dual interfaces restrict the flexibility you normally would have with .NET classes, and are especially dangerous since they expose members of base classe

Re: [DOTNET] C# to VB.NET Migration Tool?

2002-04-13 Thread Zane Thomas
Teo, > Does anyone know whether a C# to VB.NET migration tool exists to allow > converting C# to VB.NET code? This works well if you don't have too much code to translate: You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http:

Re: [DOTNET] Partition II Metadata Spec question

2002-04-13 Thread Brent E. Rector
It difficult to obfuscate code with their obfuscator as it's not even available. Fortunately I don't need to attempt to write an obfuscator. I've already written one. Demeanor for .NET has processed hundreds of assemblies and is in use in production environments world-wide. Application level obfu

Re: [DOTNET] A declaritive language for generating a CodeDOM graph?

2002-04-13 Thread Chris Sells
I agree that it would be fun to move a method from a couple of VB derived classes to a C# base class. : ) Chris - Original Message - From: "Duncan Godwin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 13, 2002 2:06 AM Subject: Re: [DOTNET] A declaritive language for ge

Re: [DOTNET] Remoting on Tcp and Http

2002-04-13 Thread Peter Laan
Now it finally makes sense. So you have to call it once on http port 80 to make aspnet_wp start listening on port 8080. I just tried it and it works! Thanks! Peter From: "Deepak Rao" <[EMAIL PROTECTED]> > You don't have to configure IIS to listen on port 8080. Just leave it on > the default po

Re: [DOTNET] Remoting on Tcp and Http

2002-04-13 Thread Deepak Rao
You don't have to configure IIS to listen on port 8080. Just leave it on the default port web server port. The ASP.Net worker process will be started on the first invocation of your object on the HTTP channel. When aspnet_wp.exe starts, it will call Configure(). It reads the config file and notice

[DOTNET] C# to VB.NET Migration Tool?

2002-04-13 Thread Teodor Lachev
Does anyone know whether a C# to VB.NET migration tool exists to allow converting C# to VB.NET code? Such a tool is mentioned in one of the Microsoft .NET Developer seminars but I was unable for find it? I am also interested in VB.NET to C# converters. Thank you, ---

[DOTNET] Delegates referencing a Property

2002-04-13 Thread Martin Wawrusch
Hi, I would like to reference a property get or set operation with a delegate, however I find no information about the syntax in the docs. Is this possible, and if so, how? Thanks Martin -- Neovalis IT Development GmbH T: +43 1 522 68 68 Neustiftgasse 17/6F: +43 1 522 68 68 - 33

Re: [DOTNET] Remoting on Tcp and Http

2002-04-13 Thread Peter Laan
I actually used .soap in both web.config and in the code. It's just that I started to write the reply and then decided to try .rem and then finished the reply. So I accidently copied part of the new code. Sorry about that. But I tried it once again just to make sure. If I configure IIS to listen

Re: [DOTNET] Collection imperssination

2002-04-13 Thread Aaron Fanetti
As far as articles go, you might check out http://www.martinfowler.com - I believe there is a section in his ISA stuff on lazy loading. However, if by "always get fresh data" you mean having real-time data, then it's not what you are looking for. Aaron -Original Message- From: dotnet dis

Re: [ADVANCED-DOTNET] Implementing ITypedList

2002-04-13 Thread Frank Hileman
The code sample referenced by this article has a project called tabtest. In it you will find a PropertyDescriptor sample. http://msdn.microsoft.com/library/en-us/dndotnet/html/vsnetpropbrow.asp I have never implemented ITypedlist, but I have implemented some PropertyDescriptors, if that is your

Re: [DOTNET] Remoting on Tcp and Http

2002-04-13 Thread Deepak Rao
I am just going to reiterate what Mike was saying - IIS is not doing anything to host your object on a TCP channel. It is only starting the ASP.Net worker process, which just happens to call RemotingConfiguration.Configure(). It is no different than you creating an exe and calling Configure(). I

Re: [DOTNET] Remoting on Tcp and Http

2002-04-13 Thread Peter Laan
Thanks for all the info Mike! However, I'm still not convinced. The help files clearly state that it's not possible and I can't get it to work. I tried with the following web.config file: It works fine if the client uses Http like this: HttpChanne

[DOTNET] Collection imperssination

2002-04-13 Thread Andreas HÃ¥kansson
Hiya, I'm trying to make all the collection in my hierachical object model, act as if they were real collections, but instead be a nice wrapper for an underlaying database. This is because I dont want to pre-populate my object model to save resources and to make sure I always get fresh data. Do

Re: [DOTNET] A declaritive language for generating a CodeDOM graph?

2002-04-13 Thread Duncan Godwin
Hi Chris, Not really offering any solutions, but being able to parse multiple languages and build a graph of a source file would be the first useful step toward adding some refactorings to Visual Studio.NET. This is something I'd really like to do, and yet the work involved in getting the base (

[DOTNET] A declaritive language for generating a CodeDOM graph?

2002-04-13 Thread Chris Sells
So, it took a while, but I'm back into codegen [1] again, this time under .NET. : ) I went with XSLT this time (it didn't exist last time [2]) and while it works (and is surprising fast for my application), the problem is multi-language support. The crowd that hangs out where I announce this k

[DOTNET] Typed Dataset

2002-04-13 Thread Vikram S
I have been doing some reading on typed datasets and its advantages. What's the performance like ? Does anyone have any statistics or advice for using it or not using using it ?? Thanks, - Vikram You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other Develo

Re: [DOTNET] Measuring performance

2002-04-13 Thread Mattias Konradsson
>From: "Donal Devine" <[EMAIL PROTECTED]> >TimeSpan tsStart; >TimeSpan tsDuration; >GC.Collect(); >GC.WaitForPendingFinalizers(); >tsStart = Process.GetCurrentProcess().Threads[0].UserProcessorTime; >//Do stuff >tsDuration = Process.GetCurrentProcess().Threads[0].UserProcessorTime.Subtract(tsStart