|
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
@Docker:
From what I know, the behavior is neither strange nor unexpected. It's only the fact that DataGridView is an intelligent control and the TextBox is a dumb control.
Observe that the it is not going hay-why. The behavior is predictable. Whateve...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
OK. Finally the quiz is closed now.
Congratulations to guenter, Docker, Maciej Pakulski, Vamshi who answered it correctly.
I have already clarified the reasons for second implementation being the answer in my last post.
@Docker: The Integer datat...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
Maciej Pakulski and guenter answered it correctly and they have given proper justification for their answers too.
The ++ operator in C# (or any C based language) increments the value being passed to it as well as returns a value.
The first implem...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
1. You need to specify “WITH SCHEMABINDING” in the view definition. You can specify it while creating the view or while altering the view. i.e. Either with CREATE VIEW statement or with ALTER VIEW statement.
2. You must provide the fully qualified name...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
The RowState remains unchanged, even though the data in DataTable will change. So the changes to child table will not be propagated to the database when you issue the Update command on the TableAdapter, even though the changes will be visible in the Dat...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
@Vamshi: VB.NET does have a **Using** statement and works same as the C# equivalent.
Here is the VB.NET equivalent of your code:
<pre class="brush:vb">Using w As TextWriter = File.CreateText("log.txt")
w.WriteLine("This is line one")
End Using</p...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
My answer was in context of object going out of scope or the last reference to the object is lost, so that the GC can take charge of it. If your object is still in scope and can be used/referenced then GC won't do anything on it. The Dispose is ultimate...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
There are already two classes **SortedList** and **SortedDictionary** which can be used for this purpose and are sufficient for our needs in most cases.
But in case you want your own implementation for any reason, it’s easy to construct your own class....
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
When you don’t call the Dispose method explicitly, the GC (Garbage Collector) does it for you. Even after you call the Dispose method, the object is not immediately disposed from memory. It is just handed over to the GC. The object is handed over to GC ...
|
-
Pradeep Kumar Answered 2 Years ago through Quizzes
You can use the appropriate NumberStyle:
<pre style="brush:csharp"><code>string svalue = GetCurrentPrice();
long value = long.Parse(svalue, System.Globalization.NumberStyles.AllowThousands);<code></pre>
I've used long here for demo purposes only. Dep...
|