Click here to Skip to main content
15,906,333 members
Home / Discussions / C#
   

C#

 
AnswerRe: Enum logic problem Pin
Ian Shlasko5-May-10 8:19
Ian Shlasko5-May-10 8:19 
AnswerRe: Enum logic problem Pin
venomation5-May-10 8:24
venomation5-May-10 8:24 
Questiondocument code Pin
toto_20105-May-10 7:13
toto_20105-May-10 7:13 
AnswerRe: document code Pin
dan!sh 5-May-10 7:24
professional dan!sh 5-May-10 7:24 
AnswerRe: document code Pin
Richard MacCutchan5-May-10 7:26
mveRichard MacCutchan5-May-10 7:26 
AnswerRe: document code Pin
Pete O'Hanlon5-May-10 9:26
mvePete O'Hanlon5-May-10 9:26 
AnswerRe: document code Pin
Dave Kreskowiak5-May-10 9:32
mveDave Kreskowiak5-May-10 9:32 
AnswerRe: document code Pin
Peace ON5-May-10 21:03
Peace ON5-May-10 21:03 
I do not find type "LineDefinition" anywhere.

I derived following code from your distorted code.

public sealed class GLine
    {

        #region Variables

        private bool m_IsDataCorrect;
        private LineDefinition m_ContentFormat;
        private short m_CRCComputed = -1, m_CRCGiven = -1;
        private string m_Code, m_Value;

        #endregion

        #region public Accessors

        /// <summary>
        /// Contient le Code de la donnée etdonne la v aleur, conformement au CDC GiEGLAN
        /// </summary>
        public string Code
        {
            get { return m_Code; }
            set { m_Code = value; }
        }

        public LineDefinition ContentFormat
        {
            get { return m_ContentFormat; }
            set { m_ContentFormat = value; }
        }

        /// <summary>
        /// Contient la valeur de la donnée et calcule le ,
        /// </summary>
        public string Value
        {
            get { return m_Value; }
            set
            {
            m_Value = value;
            ComputeState();
            }
        }

        public short CRCComputed
        {
            get
            {
            return m_CRCComputed;
            }
        }

        public short CRCGiven
        {
            get { return m_CRCGiven; }
            set
            {
            m_CRCGiven = value;
            ComputeState();
            }
        }

        public bool IsDataCorrect
        {
            get
            {
            return m_CRCGiven != -1 && m_IsDataCorrect;
            }
        }

        /// <summary>
        ///

        /// </summary>
        public bool IsDefinitionAvailable
        {
            get
            {
            return m_ContentFormat != null;
            }
        }

        #endregion

        #region public non default Constructs
        /// <summary>
        // Constructeurs
        /// </summary>
        public GLine(string code, string value, short givencrc)
        {
            m_Code = code;
            m_Value = value;
            m_CRCGiven = givencrc;
            ComputeState();
        }
        /// <summary>
        // Constructeurs .
        /// </summary>
        public GLine(string code, string value)
        {
            m_Code = code;
            m_Value = value;
            m_CRCComputed = Common.CalcCRC(value);
        }

        /// <summary>
        // Constructeurs .
        /// </summary>
        public GLine(string code, LineDefinition definition)
        {
            m_Code = code;
            m_ContentFormat = definition;
        }

        #endregion

        /// <summary>
        /// fonction pour Calculer les valeurs.
        /// </summary>

        private void ComputeState()
        {
            m_CRCComputed = Common.CalcCRC(m_Value);
            m_IsDataCorrect = m_CRCGiven == m_CRCComputed;
        }
    }


So unable to find what is exact problem with
this code...

Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....

QuestionDate formate changing in Italian settings Pin
attalurisubbu5-May-10 5:28
attalurisubbu5-May-10 5:28 
AnswerRe: Date formate changing in Italian settings Pin
Not Active5-May-10 5:55
mentorNot Active5-May-10 5:55 
AnswerRe: Date formate changing in Italian settings Pin
dan!sh 5-May-10 6:26
professional dan!sh 5-May-10 6:26 
AnswerRe: Date formate changing in Italian settings Pin
The Man from U.N.C.L.E.5-May-10 6:48
The Man from U.N.C.L.E.5-May-10 6:48 
QuestionParsing JSON Pin
harsimranb5-May-10 5:18
harsimranb5-May-10 5:18 
AnswerRe: Parsing JSON Pin
OriginalGriff5-May-10 5:39
mveOriginalGriff5-May-10 5:39 
AnswerRe: Parsing JSON Pin
Kythen5-May-10 11:32
Kythen5-May-10 11:32 
GeneralRe: Parsing JSON Pin
harsimranb5-May-10 12:03
harsimranb5-May-10 12:03 
QuestionBuffering video files Pin
TimSWatson5-May-10 4:12
TimSWatson5-May-10 4:12 
AnswerRe: Buffering video files Pin
Peace ON5-May-10 4:27
Peace ON5-May-10 4:27 
QuestionAccesing Data using DMO Pin
Nandakumar.n.pai5-May-10 2:45
Nandakumar.n.pai5-May-10 2:45 
AnswerRe: Accesing Data using DMO Pin
Henry Minute5-May-10 3:00
Henry Minute5-May-10 3:00 
GeneralRe: Accesing Data using DMO Pin
Nandakumar.n.pai5-May-10 17:39
Nandakumar.n.pai5-May-10 17:39 
GeneralRe: Accesing Data using DMO Pin
Henry Minute6-May-10 1:45
Henry Minute6-May-10 1:45 
GeneralRe: Accesing Data using DMO Pin
Nandakumar.n.pai6-May-10 20:46
Nandakumar.n.pai6-May-10 20:46 
GeneralRe: Accesing Data using DMO Pin
Henry Minute7-May-10 1:32
Henry Minute7-May-10 1:32 
GeneralRe: Accesing Data using DMO Pin
Nandakumar.n.pai7-May-10 18:57
Nandakumar.n.pai7-May-10 18:57 

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.