Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Malcolm Smart

@Malcolm Smart
About
Posts
1.1k
Topics
170
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Select treenode automatically
    M Malcolm Smart

    Christian Graus wrote:

    Your code sucks

    I've not been around for about 8 months - first post I read shows not much as changed around here!! Superb. :)

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# data-structures

  • Completely Redundant Acronym Post.
    M Malcolm Smart

    This is true - honest!! In the early 90's each tube line in London had its own IT department - the Vic Line had "Victoria Information Systems Inter Office Network" - a tad forced, but the 'Vision' mouse mats looked good. I worked for Central Line IT. Needless to say we didn't print mouse mats.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp php wpf com tools

  • Extracting from a list.
    M Malcolm Smart

    J4amieC wrote:

    foreach(Cat thisCat in zooAnimals.OfType())

    That's neat - and my trigger to start looking at 3.5 finally...

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# tutorial question learning

  • Connecting to a c# Local Database
    M Malcolm Smart

    Isn't that like trying to open an MS Excel document without Microsoft Excel? I imagine, if you want, you could open the SDF as a text file and have a look inside, but it won't act as a database without a database server. The clue is in the name - server. It 'serves' the data. The fact that the underlying datastore is a file is irrelevant.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# database csharp sql-server sysadmin

  • Need to beef up resume with design patterns
    M Malcolm Smart

    So when you tell your interviewer you know the MVC pattern, or the flyweight, or the abstract pattern, and he asked how you used it, you're gonna be stuck. Reworking a CV for a particular role is ok, but beefing it up with stuff you have no commerical experience of is easily found out (IMHO) - I've tried it!! The 'bible' is the GOF or Gang of Four[^]

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# asp-net design architecture career

  • Ensure a parameter is not null
    M Malcolm Smart

    You are actually assigned a new reference here, not changing the object the reference refers to. Try this...
    class Program { class MyClass { public int x; } static void changeMyClass1(MyClass myClass ) { myClass.x = 100; } static void changeMyClass2(ref MyClass myClass ) { myClass.x = 100; } static void Main(string[] args) { MyClass instance1 = new MyClass(); MyClass instance2 = new MyClass(); instance1.x = 0; instance2.x = 0; changeMyClass1(instance1); changeMyClass2(ref instance2); Console.WriteLine(instance1.x);//outputs 100 Console.WriteLine(instance2.x);//outputs 100 } }Like CG said, they are by ref, by default. Both instances will change. Strings behave differently, which, in my opinion is bad.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# csharp c++ question

  • Ensure a parameter is not null
    M Malcolm Smart

    Christian Graus wrote:

    You have the ref keyword but it only works on value types

    Can you explain? String is a predefined reference type, but when passed as a parameter, it is passed by value. To change the string, you have to explicitly mark it as ref in the signature

    namespace RefChecker
    {
        class Program
        {
            static void changeMyString1(string myString)
            {
                myString += " worked";
            }
    
            static void changeMyString2(ref string myString)
            {
                myString += " worked"; 
            }
    
            static void Main(string[] args)
            {
                string string1 = "has it";
                string string2 = "has it";
    
                changeMyString1(string1);
                changeMyString2(ref string2);
    
                Console.WriteLine(string1);//outputs has it
                Console.WriteLine(string2);//outputs has it worked
    
            }
        }
    }
    

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# csharp c++ question

  • [Message Deleted]
    M Malcolm Smart

    Rajesh R Subramanian wrote:

    In India (at least in Mumbai), we plug the power cord into power sockets, instead of wall.

    In Europe, at least in the UK, we aren't so pedantic. ;P

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge

  • constructors in VisualC#.NET
    M Malcolm Smart

    Pete O'Hanlon wrote:

    I suspect that there's only one plumber

    And he is actually the original poster, trying to cross train to be a developer!! I'm sorely tempted to take you up on your painting / weeding offer though Pete, I'm so far behind with this project it's untrue. I'm packing the kids and wife off you with paint brushes and spades in hand.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# csharp help

  • constructors in VisualC#.NET
    M Malcolm Smart

    shaheen13 wrote:

    1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops. 2. Create an IceCreamCone class with two fields: • IceCreamFlavor • Scoops 3. The IceCreamCone constructor calls two data-entry methods: • GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana. • GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3. 4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions. 5. Save your program. 6. Now “build” your program Can sumone plz help me with this..its urgent....

    Not sure about the rest of it, but Ctrl+S will help with step 5 and Ctrl+B should get you past step 6. Good luck with the others. Be sure to post back with the grade you get!

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    C# csharp help

  • Last code before DEATH!!!
    M Malcolm Smart

    Adam Smith wrote:

    No i need to erase all the porn evidence on my drive.

    I had erased all the porn evidence on my computer and thought I'd got away with it until the wife asked me the following morning why my mouse was on the left hand side of the keyboard....

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge question discussion

  • XKCD-OTD
    M Malcolm Smart

    My daily dose of http://www.wulffmorgenthaler.com/[^] makes me smile most mornings... most aren't that kid sister friendly though.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge c++ com tools tutorial question

  • Xrays and T-rays
    M Malcolm Smart

    Security cameras which can see through clothes http://news.bbc.co.uk/1/hi/technology/7287135.stm[^] Whilst not the most rivetting of articles, the following line amused me :- "You see a silhouette of the form but you don't see surface anatomical effects." Wouldn't 'breasts' have been easier to say? :)

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp security question announcement

  • What should one do to get answers on C# forum???????
    M Malcolm Smart

    I would skip over the first as I've never heard of CodeDom and the problem isn't C# specific. It's more IDE related - I think there is a forum for that. The second one is linked to CodeDom (I now know what CodeDom is) but at the time, meant nothing to me, which is not saying it is a bad question. Bad questions are generally voted down and answered with abuse. Questions where people don't have an answer stay unanswered. My first google search for C# J# CodeDom revealed an article on the subject here on CP http://www.codeproject.com/KB/cs/DynamicCodeGeneration.aspx[^] Ask the author in that forum - they seem to have their heads around the subject.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp help question

  • What should one do to get answers on C# forum???????
    M Malcolm Smart

    i_want_to_learn_c# wrote:

    but what about other two?????

    Which two in particular? Post links here (but not in the hope to get them answered, but so somebody might say why they didn't get answered).

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp help question

  • IE 8, I like it
    M Malcolm Smart

    Chris Maunder wrote:

    That's J-a-v-a-s-r-i-p-t

    Don't you love it when people sarcastically spell stuff out like that and then spell it wrong!! Javasript? That's me back to bronze....

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge php visual-studio com

  • What should one do to get answers on C# forum???????
    M Malcolm Smart

    You've posted one real question here.[^] There rest are either opinions, or are way outside the real purpose of the C# forum. Look at your question above, it was a decent enough question - you got answers. Look at other questions on there that get answered. then look at your other posts that were ignored - you should be able to determine the difference between a post that will attract answers and one that doesn't. And your name tag is rubbish, but that's just my opinion. So's mine, but you can blame my parents for that. :laugh:

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp help question

  • Retries or Give up at first attempt..
    M Malcolm Smart

    Vikram A Punathambekar wrote:

    and was given an award

    and you are so pleased with yourself you thought you'd post the message twice!

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp database sysadmin help tutorial

  • Get your degree at the School of Marc
    M Malcolm Smart

    Marc Clifton wrote:

    I am ali ahmad from Pakistan

    That surprised me - you don't normally get Pakistani people asking stupid questions on CP.

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge com tutorial question

  • Retries or Give up at first attempt..
    M Malcolm Smart

    Most applications I work on seem to have a 'retry' count for connecting to various servers, especially database. They will, for example, retry up to 5 times, at 30 second intervals. I don't think in all my time I have seen an error log, warning, or eventlog entry where the connection failed on the 1st\2nd\3rd attempt etc, but connected successfully on a subsequent attempt. Years ago, networks were flakey, and a retry was deemed necessary incase of a network glitch - networks don't seem to 'glitch' anymore. Do you still code 'retries' in your apps, or give up at first attempt? OT : The 'click here to edit' bubble, hovering over the signature is kinda neat!

    Knowledge is hereditary, it will find its way up or down. Luc Pattyn
    and since what every time when i want to add button to this control one add two times posted in C# forum

    The Lounge csharp database sysadmin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups