Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: Background worker thread Pin
Saamir15-Dec-08 6:17
Saamir15-Dec-08 6:17 
GeneralRe: Background worker thread Pin
#realJSOP15-Dec-08 6:18
professional#realJSOP15-Dec-08 6:18 
GeneralRe: Background worker thread Pin
Saamir15-Dec-08 6:20
Saamir15-Dec-08 6:20 
AnswerRe: Background worker thread Pin
Lev Danielyan15-Dec-08 4:37
Lev Danielyan15-Dec-08 4:37 
QuestionMultiple "dot". How to? Not sure what is it called. Pin
xav9915-Dec-08 3:45
xav9915-Dec-08 3:45 
AnswerRe: Multiple "dot". How to? Not sure what is it called. Pin
J4amieC15-Dec-08 4:06
J4amieC15-Dec-08 4:06 
GeneralRe: Multiple "dot". How to? Not sure what is it called. Pin
xav9915-Dec-08 14:28
xav9915-Dec-08 14:28 
AnswerRe: Multiple "dot". How to? Not sure what is it called. Pin
carbon_golem15-Dec-08 4:18
carbon_golem15-Dec-08 4:18 
Not sure what you're asking here, but it is just called the "dot operator". But the dot operator is a mechanism that is used by classes to link their properties, members, and methods together. Here's an example.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotOperator {
    class Program {
        static void Main(string[] args) {
            Report report = new Report();
            report.TheHeader = new Header("This is the News Today");
            report.TheArticle = new Article(@"Third suspect indicted in 27-year-old murder
                                By Bill Hankins 
                                Published December 14, 2008
A third suspect in the 27-year-old murder of Jean Wagnon has been indicted by a Lamar County grand...");

            Console.WriteLine(report.GetReport());

            Console.WriteLine(report.TheArticle.TheContent.Body); // gets the string for 
            Console.WriteLine(report.TheHeader.TheContent.Body.Length); // prints the length of the header
            Console.ReadLine();
        }
    }

    public class Report {
        public Header TheHeader { get; set; }
        public Article TheArticle { get; set; }
        public String GetReport() {
            return TheHeader.TheContent.Body + Environment.NewLine + TheArticle.TheContent.Body;
        }
    }

    public class Header {
        public Header(String header) {
            TheContent = new Content(header);
        }
        public Content TheContent { get; set; }
    }

    public class Article {
        public Article(String main) {
            TheContent = new Content(main);
        }
        public Content TheContent { get; set; }
    }

    public class Content {
        public Content(String theNews) {
            Body = theNews;
        }
        public String Body { get; set; }
    }
}


hope that helps.

EDIT: Yea, what J4amieC said.

Scott P.

"Simplicity carried to the extreme becomes elegance."
-Jon Franklin

AnswerRe: Multiple "dot". How to? Not sure what is it called. Pin
Paddy Boyd15-Dec-08 4:46
Paddy Boyd15-Dec-08 4:46 
Questionknowing the frame work is installed or not Pin
shavil15-Dec-08 3:32
shavil15-Dec-08 3:32 
AnswerRe: knowing the frame work is installed or not Pin
N a v a n e e t h15-Dec-08 4:04
N a v a n e e t h15-Dec-08 4:04 
AnswerRe: knowing the frame work is installed or not Pin
Tom Deketelaere15-Dec-08 4:06
professionalTom Deketelaere15-Dec-08 4:06 
AnswerRe: knowing the frame work is installed or not Pin
Jimmanuel15-Dec-08 4:23
Jimmanuel15-Dec-08 4:23 
QuestionHow to Embed Software Validity in a Database Software Pin
Lucky Hamad15-Dec-08 2:13
Lucky Hamad15-Dec-08 2:13 
AnswerRe: How to Embed Software Validity in a Database Software Pin
EliottA15-Dec-08 2:36
EliottA15-Dec-08 2:36 
AnswerRe: How to Embed Software Validity in a Database Software Pin
J4amieC15-Dec-08 4:02
J4amieC15-Dec-08 4:02 
QuestionMimicking a logon Pin
RugbyLeague15-Dec-08 2:00
RugbyLeague15-Dec-08 2:00 
AnswerRe: Mimicking a logon Pin
Pete O'Hanlon15-Dec-08 3:06
mvePete O'Hanlon15-Dec-08 3:06 
GeneralRe: Mimicking a logon Pin
RugbyLeague15-Dec-08 3:09
RugbyLeague15-Dec-08 3:09 
AnswerRe: Mimicking a logon Pin
Phil J Pearson15-Dec-08 3:07
Phil J Pearson15-Dec-08 3:07 
AnswerRe: Mimicking a logon Pin
m@u15-Dec-08 3:07
m@u15-Dec-08 3:07 
QuestionSocket Pin
yesu prakash14-Dec-08 23:37
yesu prakash14-Dec-08 23:37 
AnswerRe: Socket Pin
Xmen Real 15-Dec-08 1:42
professional Xmen Real 15-Dec-08 1:42 
QuestionTimer problem in UserControl Pin
Xmen Real 14-Dec-08 23:34
professional Xmen Real 14-Dec-08 23:34 
AnswerRe: Timer problem in UserControl Pin
#realJSOP14-Dec-08 23:47
professional#realJSOP14-Dec-08 23:47 

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.