Suppose I want to over-write one file with another but I want to backup the over-written file. Use io.file.replace, right?
Now what if I want to check to make sure there is adequate disk space first? Is it possible that another thread can write a file to the hard drive between my disk space...
Like I said, I like to use structures to group friend variables.
I have a program which utilizes a treeview control. The tree structure is loaded into a datatable from a database. I need the datatable. I declare the datatable in a structure called fNodes along with a few other friend variables...
I often use structures to group various friend variables into logical categories. Is there any reason why I shouldn't declare a datatable in a structure?
I ask because I'm not clear on some of the memory limitations of various objects in .net.
Hmm. Thank you; that is helpful.
I've been using vb2005 since its inception but lately I have come to feel like I'm still locked into the old way of doing things. I'm using classes as if they were code modules. I've just had a hard time getting my head wrapped around with the way .net handles...
Wow.
How about class size and complexity? I've tended to code large classes, often incorporating over a dozen different related procedures - much like code modules in older versions of vb. That seems like the wrong strategy if I were to go with a narrow-scope, instantiate and discard practice...
That's pretty much what I thought. That just seems wasteful of memory. If a class is going to be used multiple times during the lifetime of the application, does it make more sense to instantiate it once as a friend or public variable so that it doesn't continue to go out of scope and make more...
I'm not exactly a newbie but I need a better understanding of how .net deals with instances of classes that are no longer used.
The way I understand it, the garbage collector will only reclaim resources when it needs to. So if I declare an instance of a class with a procedure-level variable...
If I remove a node from the treeview control like this:
treeview1.selectednode.nodes(0).remove
without first assigning the node to a variable, is that node actually disposed of or is it floating out there in limbo - taking up resources? If it is just floating in limbo, can the garbage...
Everyone knows about the extreme dominance of the windows platform on the desktop which makes learning to be a windows programmer a no-brainer. But Windows has no such edge on the web. Hosting is more expensive with no real extra value. Linux is pretty much the standard there. I'm curious what...
Sorry if this is a real basic question but I can't seem to find how to refer to an object with a simple string variable. If a user wants to set a default font, for instance, I want to be able to persist that preference on the hard drive by storing a string representation of the font - like it's...
I'm working on an application which needs to search through every word in a rich text box and match individual words and phrases to those in a database. I'm thinking it would be faster to save the text to a string class first and search through it rather than through the rich text box itself...
Yeah, it's not hard to work around - just a little sloppy. I'm suprised there isn't something like a RichTextBox.ClearRTF method to avoid having to specify the default color. It seems like such an obvious capability you would want to build into the control. I was thinking I must be missing it...
The rich text box control uses the rtf code 'cf0' to denote default text color. It builds a color table to define other colors which are used in the rtf document in the order in which they appear. If the first colored word is red for instance, the rtf code 'cf1' is used to define red.
Is there...
Anyone have any experience with the Sharp Library or know of an independent review of the product? It looks really nice and the cost seems reasonable but two things concern me:
1. Looking at the release version history, there were an awful lot of bug fixes - 47 in the last three releases which...
Yes, I was talking about globals.
Thank's for the tip about the my.setting object! I didn't know about that. Now we have a standard object for storing preferences and other settings.
That's exactly what I did in vb6. I've just gotten the impression from more experienced programmers that public variables should be avoided if at all possible. I know that they consume stack space. Other than that issue, is putting them in a class versus just declaring them public just a matter...
Hi everyone! This is my first post here. I'm yet another vb6 coder finaly taking the .net plunge. :eek: If I understand the OOP concept correctly, there really is no place for public variables in it. I know vb.net still allows it but it doesn't seem to fit the new paradigm.
In vb6, I often used...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.