Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy we need Properties in C#
    primarykey
    data
    text
    <p>Can you tell me what is the exact usage of properties in C# i mean practical explanation</p> <p>in our project we are using properties like</p> <pre><code>/// &lt;summary&gt; /// column order /// &lt;/summary&gt; protected int m_order; /// &lt;summary&gt; /// Get/Set column order /// &lt;/summary&gt; public int Order { get { return m_order; } set { m_order = value; } } /// &lt;summary&gt; /// constructor /// &lt;/summary&gt; /// &lt;param name="name"&gt;column name&lt;/param&gt; /// &lt;param name="width"&gt;column width&lt;/param&gt; /// &lt;param name="order"&gt;column order&lt;/param&gt; public ViewColumn(string name, int width, int order) { // // TODO: Add constructor logic here // m_name = name; m_width = width; m_order = order; } /// &lt;summary&gt; /// returns the column name, width, and order in list view. /// &lt;/summary&gt; /// &lt;returns&gt;string represent of the ViewColumn object&lt;/returns&gt; public override string ToString() { return (string.Format("column name = {0}, width = {1}, order = {2}.", m_name, m_width, m_order)); } /// &lt;summary&gt; /// Do a comparison of 2 ViewColumn object to see if they're identical. /// &lt;/summary&gt; /// &lt;param name="vc"&gt;ViewColumn object for comparison&lt;/param&gt; /// &lt;returns&gt;True if the objects are identical, False otherwise.&lt;/returns&gt; public override bool Equals(object obj) { ViewColumn vc = (ViewColumn)obj; if(m_name == vc.Name &amp;&amp; m_width == vc.Width &amp;&amp; m_order == vc.Order) return true; else return false; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload