document code
-
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
-
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
-
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
-
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
toto_2010 wrote:
can you correct this document the code pls
Without us knowing what you are trying to achieve here, and what the problem you are having is, then no. I will tell you though that you have a potential issue in your code when you set a property and then call ComputeState. What happens if you don't actually change the value, but reassign one that's already there?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
Noone is going to fix your code or write your documentation for you. We can point you in the right direction, but you have to ask a question we can understand first.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
can you correct this document the code pls ,thanks namespace eControlCevertest.lib.Primitives {/// <summary> /// la class Gline est un class mere /// </summary> 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>
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); }