Click here to Skip to main content
15,916,180 members
Home / Discussions / C#
   

C#

 
GeneralRe: Activex code to print pdf files on client machine Pin
Richard MacCutchan29-May-14 2:09
mveRichard MacCutchan29-May-14 2:09 
GeneralRe: Activex code to print pdf files on client machine Pin
Sachin Mehndiratta29-May-14 22:57
Sachin Mehndiratta29-May-14 22:57 
GeneralRe: Activex code to print pdf files on client machine Pin
Sachin Mehndiratta29-May-14 22:57
Sachin Mehndiratta29-May-14 22:57 
AnswerRe: Activex code to print pdf files on client machine Pin
Eddy Vluggen29-May-14 4:12
professionalEddy Vluggen29-May-14 4:12 
GeneralRe: Activex code to print pdf files on client machine Pin
Richard Deeming29-May-14 7:57
mveRichard Deeming29-May-14 7:57 
QuestionHow can I get the file name with full path of File which is Sent to Print to Printer++ Pin
Shohel Ahsan28-May-14 22:54
Shohel Ahsan28-May-14 22:54 
AnswerRe: How can I get the file name with full path of File which is Sent to Print to Printer++ Pin
Richard MacCutchan29-May-14 0:38
mveRichard MacCutchan29-May-14 0:38 
GeneralRe: How can I get the file name with full path of File which is Sent to Print to Printer++ Pin
Shohel Ahsan29-May-14 0:52
Shohel Ahsan29-May-14 0:52 
GeneralRe: How can I get the file name with full path of File which is Sent to Print to Printer++ Pin
OriginalGriff29-May-14 1:09
mveOriginalGriff29-May-14 1:09 
GeneralRe: How can I get the file name with full path of File which is Sent to Print to Printer++ Pin
Richard MacCutchan29-May-14 1:22
mveRichard MacCutchan29-May-14 1:22 
GeneralRe: How can I get the file name with full path of File which is Sent to Print to Printer++ Pin
Shohel Ahsan29-May-14 1:25
Shohel Ahsan29-May-14 1:25 
QuestionHow do I add a video bookmark? Pin
Member 1085116328-May-14 19:16
Member 1085116328-May-14 19:16 
Questionoverloading a construtor Pin
sneezesnoeze28-May-14 11:00
sneezesnoeze28-May-14 11:00 
AnswerRe: overloading a construtor Pin
Matt T Heffron28-May-14 11:04
professionalMatt T Heffron28-May-14 11:04 
GeneralRe: overloading a construtor Pin
sneezesnoeze28-May-14 11:21
sneezesnoeze28-May-14 11:21 
GeneralRe: overloading a construtor Pin
Pete O'Hanlon28-May-14 12:47
mvePete O'Hanlon28-May-14 12:47 
Well, you can seriously simplify your logic here:
C#
namespace Dummy
{
    public class Something
    {
        private string myName;
        private int myIndex;

        public Something() : this("default", -1)
        {
        }

        public Something(string name): this(name, -1)
        {
        }

        public Something(string name, index)
        {
            myName = name;
            myIndex= index;

            DoStuff();
        }

        private void DoStuff()
        {
            // logic
        }

        // rest of class definition
}
As the three constructors are doing the same thing, with the first two providing default values, simply adding the logic into the final constructor makes things simpler. This example is no longer violating the DRY principle (Don't Repeat Yourself).
AnswerRe: overloading a construtor Pin
Eddy Vluggen28-May-14 11:14
professionalEddy Vluggen28-May-14 11:14 
AnswerRe: overloading a construtor Pin
Matt T Heffron28-May-14 11:48
professionalMatt T Heffron28-May-14 11:48 
AnswerRe: overloading a construtor Pin
BobJanova29-May-14 1:01
BobJanova29-May-14 1:01 
GeneralRe: overloading a construtor Pin
sneezesnoeze2-Jun-14 10:32
sneezesnoeze2-Jun-14 10:32 
QuestionSong Organizer c# Pin
AtmotechDejan28-May-14 9:55
AtmotechDejan28-May-14 9:55 
AnswerRe: Song Organizer c# Pin
Mycroft Holmes28-May-14 13:00
professionalMycroft Holmes28-May-14 13:00 
QuestionMethod for erase textboxes by clicking a button Pin
Vexy28-May-14 7:19
Vexy28-May-14 7:19 
AnswerRe: Method for erase textboxes by clicking a button Pin
Eddy Vluggen28-May-14 7:22
professionalEddy Vluggen28-May-14 7:22 
GeneralRe: Method for erase textboxes by clicking a button Pin
Vexy28-May-14 7:28
Vexy28-May-14 7:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.