15,888,461 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 Python 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 RajeshRaushan (Top 10 by date)
RajeshRaushan
1-Apr-13 9:04am
View
This is correct: You can do something like following using CAST function - assuming RS is an integer column.
CAST(RS as varchar(10)) LIKE '%{0}%'
RajeshRaushan
28-Mar-13 10:49am
View
Hey Ram, your point is correct. i am forwarding a link here - hope it is useful for you.
http://blogs.technet.com/b/heyscriptingguy/archive/2004/09/01/how-can-i-create-a-folder-on-a-remote-computer.aspx
RajeshRaushan
26-Mar-13 1:21am
View
Ok - agreed! ContainsKey optimizes the performance and it would make more sense when you are dealing with large collections;
RajeshRaushan
25-Mar-13 9:21am
View
Which page? If you do it from client side then the postback will not happen for the first-page. The 2nd page you are redirecting - so that is expected to load anyway.
The question isn't very clear in that sense - let me know if it is asking for something else.
RajeshRaushan
25-Mar-13 8:26am
View
why are you clearing the columns just after adding them - i believe you want to clear the rows instead; but that also would not be required here.
dt.Columns.Clear();
RajeshRaushan
25-Mar-13 3:04am
View
RajeshRaushan - 1 sec ago
Hey Matt. I feel both are in Order(M * N)
In the Solution 2 also if you see - the statement
!Dict2.ContainsKey(l1.ID) is actually in Order of N
then,
Lst1.Where is in Order of M
so when it runs then for each of M the N will be applicable
so it is also of O(M*N)
The same applies to
var r = from t in lst1 where !lst2.Exists(i => i.ID == t.ID) select t;
also. Here just instead of ContainsKey i have used Exists.
There is no difference otherwise.
RajeshRaushan
25-Mar-13 3:03am
View
Deleted
Hey Matt. I feel both are in Order(M * N)
In the Solution 2 also if you see - the statement
!Dict2.ContainsKey(l1.ID) is actually in Order of N
then,
Lst1.Where is in Order of M
so when it runs then for each of M the N will be applicable
so it is also of O(M*N)
The same applies to
var r = from t in lst1 where !lst2.Exists(i => i.ID == t.ID) select t;
also. Here just instead of ContainsKey i have used Exists.
There is no difference otherwise.
RajeshRaushan
4-Mar-13 2:38am
View
Can you provide what exactly you have written?
RajeshRaushan
22-Feb-13 10:22am
View
Can you try following once -
System.Type[] arr = { };
Pass the arr.
RajeshRaushan
19-Feb-13 4:29am
View
You are creating dynamic type on your own. The problem here is with the creation. Every time you create an Instance it creates a code snippet and compile - all these just to get a proper function definition for the supplied T type.
Just maintain the private Func<T,T,T> as static. In the Instance constructor see if it is null.
If so do what you are doing - otherwise no need to create and compile that once again. the function would be there already for the supplied type.
This way for a given type T - you will not end-up creating function dynamically every time.
C# generics are different from C++ templates. It doesn't provide the exact thing here - but this kind of usage in real world example is extremely rare. Also this isn't best way how we should work with Generics.
It will work for numeric types - but if somebody starts using like ParallelNumber<string> or ParallelNumber<employee>.
It will throw a runtime exception and that is not c# way of programming for sure. C++ is a language for intelligent developers - where a lot depend upon intelligence of the programmer - where as C# is a intelligent language in itself. It puts best effort to make sure things doesn't get wrong and surprises are not travelling directly to end-user.
Show More