15,890,438 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 Jon Artus (Top 3 by date)
Jon Artus
27-Apr-12 18:31pm
View
Reason for my vote of 1
Sorry, but this is completely unhelpful. The code is out of context, full of typographical errors ("proider", "inveltory", ".Tex=") and would never compile.
You're not explaining what you're doing, and that the query you're using map to worksheet and column names in a specific workbook in a specific location.
Jon Artus
26-Mar-12 10:41am
View
Reason for my vote of 2
Interesting, but given that collection initializer syntax does this already and will perform better, I'm not sure when I'd ever use this code. You can achieve the same effect by doing:
var dict = new Dictionary<string, object="">
{
{ "Id", 1 },
{ "Name", "Tom Bombadil" },
{ "CreatedOn", DateTime.Today },
{ "CreatedBy", "root" }
};
Jon Artus
26-Mar-12 10:39am
View
Deleted
Reason for my vote of 2
I'm just not clear on what advantage this has over using collection initializer syntax? Given that this does the same thing, but performs better and is easier to read, I'm not sure when I'd ever use that code.
var bag = new Dictionary<string, object="">
{
{ "Id", 1 },
{ "Name", "Tom Bombadil" },
{ "CreatedOn", DateTime.Today },
{ "CreatedBy", "root" }
};