16,011,868 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by code4Better (Top 50 by date)
code4Better
12-Nov-20 8:18am
View
Thank you Richard. Appreciate your help!
code4Better
12-Nov-20 7:00am
View
Thanks Richard. I read it what i understood is GetHashCode helps in faster retrieval of keys which means faster comparing. Is this true?
code4Better
1-Aug-20 7:28am
View
Yes, we can. Thank you!
code4Better
31-Jul-20 4:08am
View
Thank you for the response @F-ES Sitecore. The Liskov Substitution Principle says that "the object of a derived class should be able to replace an object of the base class without bringing any errors in the system or modifying the behavior of the base class". When it says with out modifying the behavior, virtual override cannot be used with out abstract or interface. This means to adapt LSP, class should have an interface or abstract as base class. This was my confusion.
code4Better
6-Apr-20 4:08am
View
Thank you very much Maciej.
code4Better
6-Apr-20 3:03am
View
Sorry if i confused you. Basically what my question was
here I am calling SomeMethod() multiple ways as shown
1. rc.SomeMethod(x=>x.Name.StartsWith("F"));
2. rc.SomeMethod(x => x.Name.Equals("Cindrella"));
3. rc.SomeMethod(x => x.Name.Any());
// SomeMethod implemenation. Method checks whether query executed is approved query or not
private bool SomeMethod (Func<person, bool=""> predicate)
{
//if query matches with StartsWith, return true
{logic to identify query is StartWith}
//if query matches with Equal, return false
{logic to identify query is Equal}
//if query matches with Any, return false
{logic to identify query is Any}
.... So on
}
So here i wnat to use a method which will restrict some of the queries and will allow few of them depending upon the approved query list. In the above example i allowing only 'StartsWith' as approved query. Remaining are not approved. Hope i am able to explain better this time.
code4Better
5-Apr-20 11:26am
View
Thank you very much Maciej Los. Really appreciate the detailed explanation and the time you spend for this. I have one question on above details,
From public List<person> Filter(Func<person, bool=""> predicate) method, is it possible to know 'StartsWith' is the actual query what is been called? I tried different options and i am able to get class name as 'person' and argument as 'x' but could not find any option which will give query 'StartsWith'. Can you please help me on this?
code4Better
29-Mar-20 10:41am
View
??
code4Better
29-Mar-20 7:04am
View
Thank you @OriginalGriff. I agree with exposing methods but i am curious to know whether any way we can intercept query and check what is been used. ex:if the query is _personalInfo.Where(p=>p.age > 30) then, is there a way to know that it is a 'Where' query?
code4Better
9-Aug-19 0:32am
View
Thanks Simon
code4Better
9-Aug-19 0:31am
View
Thanks Rickzeeland.
code4Better
8-Aug-19 13:28pm
View
Can you please read my question once again
code4Better
8-Aug-19 13:25pm
View
This is the one which i already read. I k ow how to implement but why to implement since simply we can create a function inside class, that was my question
code4Better
6-Aug-18 3:34am
View
I will check this. Thank you Rick.
code4Better
6-Aug-18 3:33am
View
Thank you Conny.
I thought of MVVM. Since i am using winforms and not WPF MVVM not sure? I know I can achieve it with INotifier and bind it. I think i may have to design a logic class for each control?
code4Better
19-Apr-17 6:59am
View
Yes you are correct. It will say cannot implicitly convert type object to bool.
code4Better
19-Apr-17 6:29am
View
But is there any difference between them..any idea?
code4Better
20-Oct-16 7:00am
View
Thanks much Pallani.
code4Better
20-Oct-16 6:56am
View
Sure Johan, Thanks
code4Better
20-Oct-16 6:34am
View
Johan, Thanks for your response. Mine is a winform application not WPF
code4Better
24-Aug-16 5:28am
View
Thanks Karthik.
This code is working now.
Once again thanks for your help.
code4Better
24-Aug-16 5:03am
View
Yes.
I dont want to use it directly like objModel.UserName = txtUserName.Text;
I want to use with binding only.
code4Better
24-Aug-16 4:50am
View
Thanks for the reply Karthik.
Your mentioned scenario what is happening is "abc" is getting displayed on to the text box. But what i need is what ever i write on text box, model property should be updated when i call some ok button.
code4Better
7-Oct-14 0:45am
View
<!-- creating an instance of my C# class to get the C# functions. I will be registring the class with regasm.exe-->
<object id="Object1" classid="clsid:cc12f78-67fe-4c22-9364-cdb743c22aa5"> </object>
<script language="javascript" type="text/javascript">
var resultValue= document.ctrlPanel.ReturnMessage();
alert(resultValue); <!-- correct value is getting poped in the alert window-->
</script>
<!-- Table for displying the output -->
<table id=Table2 style="width: 200px; font: 8pt Arial;">
<tr id="Tr5" style="height: 22px;">
<!--display output value here-->
<td id ="opValue">resultValue</td>
<!--output value displayed is simplt the text 'resultValue'. It is not displaying the value of the variable. How to display the value of the variable??-->
</tr>
</Table>
code4Better
7-Oct-14 0:43am
View
<!-- creating an instance of my C# class to get the C# functions. I will be registring the class with regasm.exe-->
<object id="Object1" classid="clsid:cc12f78-67fe-4c22-9364-cdb743c22aa5"> </object>
<script language="javascript" type="text/javascript">
var resultValue= document.ctrlPanel.ReturnMessage();
alert(resultValue); <!-- correct value is getting poped in the alert window-->
</script>
<!-- Table for displying the output -->
<table id=Table2 style="width: 200px; font: 8pt Arial;">
<tr id="Tr5" style="height: 22px;">
<!--display output value here-->
<td id ="opValue">resultValue</td>
<!--output value displayed is simplt the text 'resultValue'. It is not displaying the value of the variable. How to display the value of the variable??-->
</tr>
</Table>
code4Better
3-Aug-14 15:32pm
View
Thank you so much Andrius
code4Better
26-Jun-14 21:16pm
View
Thanks for your time Sergey. This works fine now. Shared MSDN doc is also a gud one.
code4Better
26-Jun-14 9:32am
View
Hi Chill, thank you for the answer. The link what you have provided has same interface methods with same return types where as in my case the return type of the interface methods are different. That is the reason i am geting error.Do you have any more input on this ??
code4Better
11-May-14 17:05pm
View
Thanks for your input Bernhard Hiller.
code4Better
11-May-14 17:03pm
View
Hello Dave,
You dont need to tell me whether it is stupid idea or not. I am already able to achieve the result using dynamic. My question was with out using dynamic. If you dont the answer you just keep quiet or just go and read something and then comment.
code4Better
8-May-14 20:51pm
View
i want to have a method where it can take arguments and their type will be decided in run time (i will provide the arguments only which can be added together)and returns the respective type. I dont want create same function which does same functionality for different types. That was the intention to write such a method. Do you have any idea how can we accomplish that funtion into working ??
code4Better
8-May-14 20:46pm
View
Hello Hiller,
Thanks for your time.
As you said we can add int and string together but i want to have a method where it can take arguments and their type will be decided in run time (i will provide the arguments only which can be added together)and returns the respective type. That was the intention to write such a method. Do you have any idea how can we accomplish that funtion into working ??
code4Better
12-Sep-12 0:48am
View
5+ TR
code4Better
11-Sep-12 7:19am
View
Hello Kuthuparakkal,
Thanks for helping. Great logic and its working fine
code4Better
14-Aug-12 6:21am
View
Thank you amit
code4Better
14-Aug-12 3:10am
View
Dotnet 2.0
code4Better
31-Jul-12 6:06am
View
Any way thank you very much Mr.Richard
code4Better
30-Jul-12 4:53am
View
I tried exporting the function and even the class itself as shown below. But still am getting same error. Please help!
#pragma once using namespace System;
namespace Test
{
public class __declspec(dllexport) Class1
{ public:static int Add(int i, int j)
{ return(i + j);
}
};
}
code4Better
30-Jul-12 4:51am
View
I tried exporting the function and even the class itself as shown below. But still am getting same error. Please help!
#pragma once using namespace System;
namespace Test
{
public class __declspec(dllexport) Class1
{
public:static int Add(int i, int j)
{ return(i + j);
}
};
}
code4Better
30-Jul-12 4:51am
View
I tried exporting the function and even the class itself as shown below. But still am getting same error. Please help!
#pragma once using namespace System; namespace Test
{
public class __declspec(dllexport) Class1
{
public:static int Add(int i, int j)
{ return(i + j); }
};
}
code4Better
30-Jul-12 3:13am
View
fds
code4Better
30-Jul-12 3:13am
View
I tried exporting the function and even the class itself as shown below. But still am getting same error. Please help!
#pragma once
using namespace System;
namespace Test {
public class __declspec(dllexport) Class1
{
public:static int Add(int i, int j)
{
return(i + j);
}
};
}
code4Better
30-Jul-12 3:10am
View
Deleted
rr
code4Better
30-Mar-12 0:29am
View
Hello Vladislav,
Already i used an asynchronous delegate to do this. I think it is same using a thread. But still the issue persist. I think issue is during deletion Focus is completly on gridview form and gridview and there are no other action being carried out. Can this be a reason ?
code4Better
30-Mar-12 0:16am
View
Hello CDP1802,
When i delete some 5000rows it will take some 30 to 60 seconds to complete. During this time if i simply click anywhere in gridview form, then form goes to "Not responding" state and it continues being Not responding state untill whole rows are deleted.
code4Better
30-Mar-12 0:11am
View
Hello Birajdar,
I am always deleting 0th index because i want to delete the 1st nRows. In datatable if you delete 1 row then whole rows are shifted 1 above. So there is no problem with delete part.
Deleting 1000 records will be take only fraction of seconds if the datatable from which you are deleting is not datagridview datasource. If it is datagridview datasource then it will take some time.
My issue is not logic. The grid view form gets into "Not responding" state during the deletion process. How to solve this?
code4Better
15-Feb-12 6:42am
View
i tried to use
req.Credentials = netcredit;
req.Proxy.Credentials = netcredit;
but still i am getting same error ?
code4Better
15-Feb-12 6:33am
View
Dear varun,
Is there any problem with my code ?
code4Better
6-Jan-12 7:02am
View
Thanks Tushar, 'case' works 4 me.
In combo box we can have display member and value member. Is there any such option for data table columns??
code4Better
6-Jan-12 5:47am
View
Your solution is just accessing data from a data table. My question is different from it
Show More