microsoft.public.dotnet.framework Archive - November 2001
Post a message to this list
Messages
Page: 123
Inheritance and Constructors (2 replies)
microsoft.public.dotnet.framework
I have a class as such public class a { public a (int x) { Console.WriteLine("a" x.ToString()); } } and then I inherit the class like so public class b : a { public b (int x) { Console.WriteLine("b" x.ToString()); } } When compiling, I get an error stating that a has no overloaded method for 0 arguments. What I am trying to do is inherit a class that must receive an argument at the time of creatio...
Activator.CreateInstance (3 replies)
microsoft.public.dotnet.framework
I am having trouble with Activator.CreateInstance. All I want to do is create a new instances of a class passed through as a string. I have a class Class1 and try the following object pc Activator.CreateInstance(null, "Class1"); I get An unhandled exception of type 'System.TypeLoadException' occurred in mscorlib.dll If I try the following I have no problems. Class1 pc new Class1(); Any ideas?
Effects of Inheritance? (3 replies)
microsoft.public.dotnet.framework
Hello, I have a question regarding Inheritance and performance. With regards to issues like memory, what physically happens when I Inherit an object? Does it load that object into memory? This is new to me coming from a VB/ASP background. In ASP an include file would be loaded into memory, possible creating issues if too many were used, and if they in turn also included other files. When using Vis...
GetThumbnailImage ? (3 replies)
microsoft.public.dotnet.framework
I'm working in VB and attempting to create a thumbnail from a jpg that is smaller visually AS WELL AS IN SIZE. Does anyone happen to know how I can approach this? I'm trying to use GetThumbnailImage but struggling with what to put in the last 2 parameters. Any suggestions would be helpful. Thanks.
Strongly Typed Collections (2 replies)
microsoft.public.dotnet.framework
Can anyone provide an example of how to build a strongly typed collection class based on the HashTable class? I am really struggling with getting the "for each object in objects" part of the problem and a little example would really help me out a lot. TIA Perhaps a collection of the following type of object: Public Class Person Private msID As String Private msName As String Public Property ID() A...
Why private? Why internal? I'm annoyed! (6 replies)
microsoft.public.dotnet.framework
I'm sorry for my English is not very clear but do you remember the days in MFC? Everything not public is protected, so we can get most out of the library by deriving from it and changing whatever we want. But what now in .net? So many things (often key things) are private or internal that I can't access even if I derive from the class. That would greatly reduce the extensibility of the class libra...
Why Microsoft didn't obfuscate what is private (methods and classes) ? (2 replies)
microsoft.public.dotnet.framework
Why Microsoft didn't obfuscate what is private (methods and classes) ? At least decompilation could have been a little more difficult and private member names must not appear in the compiled code anyway !! Thanks
system.net.sockets riddled with bugs in rc1 (7 replies)
microsoft.public.dotnet.framework
As written a number of times in these newsgroups, emails to people I thought were in the know, and even to the devstudio bugs list (why on earth does one need to register there!?!?!), there are bugs in system.net.sockets. I wrote about these with Beta1, Beta2, and again when RC1 was released. Each time (except recently when it was forwarded by a good sole, then pooh poohed by the correct person) t...
browse for directory in VB.NET? (2 replies)
microsoft.public.dotnet.framework
I have a listbox that lists the contents of a directory. However, I want to be able to change the the directory by browsing. Right now I'm using an input box to have the user enter a path manually. Is there another option? I liked the dir and file list boxes in vb6, but I don't really want to pull those into .NET. I'd like to stay a little pure here, and besides, I'd assume that .NET has not forgo...
API LoadString throws exception; but Err.Num = 0! (14 replies)
microsoft.public.dotnet.framework
In the code below, the statement zFetchString LoadStringByNum(m hInstance, CLng(vID), sBuffer, lBufLen) throws a very strange VB exception. Control branches to the error trap, yet Err.Number 0! The parameters passed to LoadStringByNum (LoadStringA) are as follows: Long : m hInstance 209980341484519424 Long : CLng(vID) 109 String: sBuffer a preallocated buffer of 256 spaces Long: lBufLen 256 Can yo...
Hashtable implementation (3 replies)
microsoft.public.dotnet.framework
Dear Friends, i would like to know in that way is implemented the HAshTable collection in .NET. Could someone point me in the right direction ? There's some documentation anywhere? Thanks Stefano
Exceptions (2 replies)
microsoft.public.dotnet.framework
Is there a list of predefined exception classes? Microsoft says we should use exception classes already created in the framework when possible. In that case it would be nice to have a list of the predefined standard exception classes. I need to throw an exception for a function parameter error being out of range. I know there is an exception class that would be appropriate to use in this case... T...
Destroy Me (10 replies)
microsoft.public.dotnet.framework
Hello, How can I make a class kill itself? For instance, in a data wrapping class, I take the ID of the record as a param in the constructor. If the load fails, I'd like to destroy that instance: Dim myFoo As New Foo(123) Then, inside Foo: Public Sub New(ID as Integer) If Me.Load(ID) False Then Me Nothing 'How do I do this line? End Sub Thanks, Mike
dropping Socket connections (2 replies)
microsoft.public.dotnet.framework
I've written a server that pushes XML data to a Macromedia Flash movie. I've created two implementations of this server. The first used the the TcpListener class; the second, the Socket class. (I tend to prefer the latter because of its built in support for asynchronous programming.) Here's the problem: I have code to check to see if the client socket for the Flash movie is connected before callin...
Windows Service question (3 replies)
microsoft.public.dotnet.framework
Hi all, I want to write a windows service using System.ServiceProcess.ServiceBase. and I want this service to expose some methods for clients to use. My problem is that i don't know how can a client connect a window service and run methods on it. I'l be glad if someone can help me or point me to some document... thanks, Yaniv Hakim
Something like CreateObject (5 replies)
microsoft.public.dotnet.framework
Hi, Is it possible to created a Class Library project that does not contain any COM classes, and load/call a class in it dynamically (late binding) from another program (.NET Windows program), without adding a reference to the Class Library to the other program. If there is a COM class in the project, I can use CreateObject to create it, but I do not want COM classes in it : ( Thanks, Chris.
SqlDBType Problem (3 replies)
microsoft.public.dotnet.framework
I am having trouble passing a parameter through to a stored proc in with VB.NET The parameter in the Stored Proc is a numeric so I am trying SqlDBType.Numeric, 9 But I get the error message X:\cgi bin\nc\DOTNET\test3.aspx.vb(18) : error BC30456: The name 'numeric' is not a member of 'System.Data.SqlDbType'. Dim prmUsr As SqlParameter New SqlParameter("@Usr", SqlDBType.numeric, 9) Could someone tel...
Import doesn't work (6 replies)
microsoft.public.dotnet.framework
I am trying the following import system import system.data at the top of an Assembly. But I am getting the following error Microsoft (R) Visual Basic.NET Compiler version 7.00.9254 for Microsoft (R) .NET CLR version 1.00.2914.16 Copyright (C) Microsoft Corp 2001. All rights reserved. C:\test1.aspx.vb(2) : error BC30466: The Namespace or type 'Data' for the Import 'System.Data' cannot be found. Imp...
class libray source? (8 replies)
microsoft.public.dotnet.framework
A question targeting the MS developers and theire mangers... Where can I get the information on how the framework works excactly? Is there any source code of the class library available? can it be built in a way that I could source code debug when enetering methods of the CL? Well, with MFC we could, with Java we can, is it really not possible with .NET? then, why? Though as a software developer y...
Globalization? (3 replies)
microsoft.public.dotnet.framework
Hello, How can I set the thread's current culture, if I only have the language name? I want to localize a web app, but I don't care about formatting strings. I'd like to just be able to set "en" for english, "es" for spanish, and so on. Is there any way to do this? Or must I have Spanish (Mexico), Spanish (Guatemala), English (United States), etc etc? mike
serialize / deserialize a dataset in and out of session (8 replies)
microsoft.public.dotnet.framework
could someone provide some guidance (code) on passing a dataset to an out of process session object (serialize) and then grab it back (deserialize) into a dataset? Thanks in advance. Kris
wait() or delay() instead of timer trick? (2 replies)
microsoft.public.dotnet.framework
Anyone know of a new EASY method that can be used with .NET that creates a wait effect perhaps passing milliseconds as a parameter or maybe a while loop that instead of a condition you specify time ie: WAIT(30000); //would Application.DoEvents() for 30 seconds ?
Garbage collect event (5 replies)
microsoft.public.dotnet.framework
Is there an event I can subscribe to that will signal me when a garbage collect is about to happen? My application is holding (caching in memory) a large number of images. If I can determine when the system needs to perform a garbage collect, I could release some of the references to images I'm holding that I could drop and reload later when needed. Is this possible? Thanks, Tony
Dispose / x = Nothing (2 replies)
microsoft.public.dotnet.framework
A quick question... Should I be calling the Dispose method when getting rid of objects? (ones that have a Dispose). Should I also set the object to Nothing as well?
convert char to string in C# (4 replies)
microsoft.public.dotnet.framework
I'm trying to convert the following variable to string: private char[] cBuffer; ..... //do something return cBuffer.toString(); but the output is: "System.char()" The output that I want is the exact string in cBuffer, not the literal name of the object. I try this way: System.Text.StringBuilder test new System.Text.StringBuilder(); test.Append(cBuffer,0,1024); return test.ToString(); The out put i...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com