xtremebiz

Stories submitted by xtremebiz

LINQ ElementAt and ElementAtOrDefault(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 3 years, 9 months ago

We can use the ElementAt extension method of LINQ to return the element at a specified index (zero based) in a sequence. However the ElementAt extension method would throw the System.ArguementOutOfRangeException when the specified index is a negative value or not less than the size of the sequence. In such a scenario, we can use the ElementAtOrDefault extenion method which would return the default value of a type instead of throwing the System.ArguementOutOfRangeException. Read this article for code example (both in C# and VB.NET) with comments read more...

add a comment |category: |Views: 79

tags: another

T-SQL Function to Get Int From Varchar(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

I recently had to write a T-SQL function which cleans up all non numeric characters from a varchar variable and returns the int value of the remaining numeric characters. If no numeric characters exist, the function should return zero. I thought it would be nice to share this with you and I hope you find this useful ;-) Expected output of the function: PRINT dbo.GetIntFromVarchar('R1A2J3') -- returns 123 PRINT dbo.GetIntFromVarchar('COOL456CODER') -- returns 456 PRINT dbo.GetIntFromVarchar('789') -- returns 789 PRINT dbo.GetIntFromVarchar('GEEK') -- returns 0 read more...

add a comment |category: |Views: 43

tags: another

LINQ Single and SingleOrDefault(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

This post explains about the Single and SingleOrDefault extension methods of LINQ, possible exceptions which can be thrown, and provides code examples both in C# and VB.NET along with code comments. read more...

add a comment |category: |Views: 805

tags: another

Developers are Born Brave(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

Reality about software development. The image on this blog post says it all ;-) Cheers to every coder !!! read more...

add a comment |category: |Views: 21

tags: another

Coders versus Project Managers(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

Few months back, I got below joke emailed to me by my friend who is also a passionate coder. In my personal (and humble) opinion, below joke hits jackpot with the current state of 9 out of 10 IT companies in India, which are headed by people who have zero or very little technical background. And perhaps this explains why Indian IT companies still have to market themselves as low cost outsourcing destinations to win business any why we still dont have too many Product based IT companies in India :-) Is the story same in your country too? Let me know, I would love to hear :-) read more...

add a comment |category: |Views: 14

tags: another

AddItem Extension Method for CheckBoxList, DropDownList, ListBox(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

Just 1 AddItem extension method which works for 5 controls to make the code a lot simpler and cleaner :-) Cheers to object inheritance and cheers to Extension Methods ;-) read more...

1 comment |category: |Views: 95

tags: another

Setting StringBuilder's Initial Capacity for Extreme Performance(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

You must have come across plenty of articles on the internet which talk about using the StringBuilder class when computing large strings for performance gains. Nothing wrong with that. However I have not seen many coders using the Initial Capacity constructor of the StringBuilder class which can further result in EXTREME PERFORMANCE. read more...

add a comment |category: |Views: 21

tags: another

T-SQL Query to Find the Second Lowest Column Value in a Table(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

After reading my earlier post "T-SQL Query to Find the Second Highest Column Value in a Table" a lot of users asked me to also help them with writing a query to find the second lowest column value in a table. Read this post for the solution. read more...

add a comment |category: |Views: 52

tags: another

LINQ Last and LastOrDefault Methods(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years ago

This post explains about the Last and LastOrDefault extension methods, possible exceptions which can be thrown, and provides code examples both in C# and VB along with code comments. read more...

add a comment |category: |Views: 243

tags: another

LINQ First and FirstOrDefault Methods(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 1 month ago

This post explains about the First and FirstOrDefault extension methods, possible exceptions which can be thrown, and provides code examples both in C# and VB along with comments. read more...

add a comment |category: |Views: 358

tags: another

Cool Extension Methods for IDataReader Interface(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 1 month ago

18 cool Extension Methods to for cleaner data access using the DataReader class. Cut down your data access code by using these 18 Extension Methods. Full source code available for download :-) read more...

add a comment |category: |Views: 45

tags: another

System.Data.DataSetExtensions Assembly Error in Visual Studio 2008 RTM(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 1 month ago

After upgrading from Visual Studio 2008 Beta 2 to Visual Studio 2008 RTM, you might get the following error in your ASP.NET projects: Could not load file or assembly 'System.Data.DataSetExtensions, Version=2.0.0.0 Read this post for solution. read more...

add a comment |category: |Views: 35

tags: another

Trick: Making Non Themeable Properties of ASP.NET Controls Themeable(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 1 month ago

Excellent hack to make Non Themeable properties of ASP.NET controls Themeable. After learning this hack, you would be able to set the Display and the ValidationExpression properties of the RegularExpressionValidator control directly from a Skin file !!! Even the MaxLength property of a TextBox. Would it not be cool to validate all email addresses across your website through a single Skin file ??? read more...

add a comment |category: |Views: 9

tags: another

Cool TrimText Extension Method for TextBox(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 2 months ago

Really cool and simple Extension Method for handling user input in TextBoxes read more...

1 comment |category: |Views: 18

tags: another

Creating Self Signed SSL Certificates on IIS 6.0 and Win Server 2003(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 3 months ago

Step by step tutorial (with screen shots) on creating self signed SSL certificates on IIS 6.0 and Win 2003 development / test servers using the FREE SelfSSL tool which comes with IIS 6.0 Resource Kit Tools. You can even use it to secure your local intranet. read more...

add a comment |category: |Views: 327

tags: another

Building a Web 2.0 Portal with ASP.NET 3.5(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 4 years, 3 months ago

If you are interested in learning how to design and develop world class highly scalable ASP.NET web portals using the latest and coolest Microsoft.NET technologies like ASP.NET 3.5, LINQ, Windows Workflow Foundation (WWF), ASP.NET AJAX, etc, then buy this great new book by Omar Al Zabir read more...

add a comment |category: |Views: 26

tags: another