Search results for query: *

  1. O

    Simple property/field question

    So the above code I just wrote wouldn't be considered bad practice because it's a property? Because Color is a transport vehicle for the private field 'color'...
  2. O

    Simple property/field question

    What you are trying to tell me, is that properties don't allow me to do the following public class main public sub main() dim a as new Apple("Red") a.Color = "Car" end sub end class public class Apple Public Property Color() As String public sub new(color_ as String)...
  3. O

    Simple property/field question

    If you can tell me how this does not apply to public shorthand properties, then I will believe you. c# - Are protected members/fields really that bad? - Stack Overflow "Since a field is totally uncontrolled, putting it "out in the wild" opens your class and classes that inherit from or interact...
  4. O

    Simple property/field question

    So then you are saying that a public shorthand property is void of the same problems a public field has?
  5. O

    Simple property/field question

    But, as much as public variables have a bad rap and are advised against in virtually every tutorial there is - this is a new feature that avoids that disclaimer, since I have not seen it anywhere that 'using this shorthand is a bad thing'. Are you saying that even though both carry the same...
  6. O

    Simple property/field question

    Ulg, that article just misses my question for the single reason: it doesn't address why public variables were recommended against in the first place. All it says is how many more features a property carries with it than a variable, and why switching between the two causes subtle code changes...
  7. O

    Simple property/field question

    Why wouldn't this recommendation apply? (that so many people agree upon) "It is recommended, with very few exceptions, that you never publicly expose member fields." What makes it more secure/more abstract from simply having a public variable? I keep thinking we're on the same page, but I...
  8. O

    Simple property/field question

    I guess I want to know why they made a shorthand public property since it seems as if it were a step backwards. Making a property used to force people to make get/set, but with shorthand it doesn't.
  9. O

    Simple property/field question

    "You can also find much feedback about this on the web, perhaps also even more reasons, just about every VB developer has asked that same question before you." I realize my initial question wasn't asking what I wanted to know - I apologize for that. The question assumed that you wouldn't want...
  10. O

    Simple property/field question

    To me, the reasons for not using a public variable are all apparent in a public shorthand property. There are no getters/setters (which means no abstraction) and they are still available for everyone. The only positives seem to correlate with how the language handles properties vs fields -...
  11. O

    Simple property/field question

    So I'm just trying to understand why someone would want to use the shorthand property instantiation Public Property CarModel As String <-- property as opposed to Public CarModel As String <-- variable
  12. O

    Single code base, multiple service clients

    So I need to make this service for a company, and it will need to be deployed on multiple servers. The service is really simple, but I'm wondering what the best way to handle updates/fixes would be. I'm thinking a patching system will be the only way to go, but I am not sure, and I wouldn't...
  13. O

    Design question

    So the web application I'm working with is basically just displaying status/statistical information from a database. I was given the task of cleaning it up since the code was beyond messy. One thing I did to clean it up was to get rid of all the ad hoc table index calls to access data - I did...
  14. O

    Question SqlDataSource question

    Thanks for your reply - and I'm personally not a fan of web forms at all. Mainly any type of wysiwyg development annoys me (unless it's very small scale). Each page's design view is so cluttered and don't look anything like what you would see in a browser. It's what I have to work with...
  15. O

    Question SqlDataSource question

    So I'm refactoring code for an asp.net web app. I'm new to asp.net, and was surprised to learn about the data-binding within controls. It seems nice and simple, however it also seems to be mingling data code with logic (within this implementation). My question is how to use data-binding while...
  16. O

    Shared function in an interface

    My base problem is that I would like to have an interface define a shared function, although through vb (the CLR from what i've read) does not allow for it. After reading, I don't think there is a single solution to this problem, so let me give you some context. I am trying to implement MVC...
  17. O

    ListBox Trouble

    So I finally am done fixing my ListBox control to run smoothly, but it took a long time to do that. My question is whether or not there's an easier way to accomplish this. From all the google searching I've done the past couple days, it seems there is none. Here's my train of work. I started...
  18. O

    listbox horizontal scroll event

    Well it sucks, but it seems that it simply can't be done according to this article. Getting Scroll Events for a Listbox - CodeProject I will probably follow one of the examples i've seen then which do as the above article does - creating the events myself.
  19. O

    listbox horizontal scroll event

    So I have a custom listbox that is displaying garbage text when scrolling horizontally. I need the custom listbox to stop an annoying flicker, but it's causing issues with the scroll. I think I could solve the issue if only I could access the hscroll event, but I don't know how to do that. I...
  20. O

    Question ListBox Selectionmode = none question

    Well, I had to write out the question before i could search the right keywords for this one. Anyway, the answer lies in the following variable's state property. ByVal e As System.Windows.Forms.DrawItemEventArgs For anyone who might come across this problem, the fact that the item has focus...
Back
Top