Lindsay Donaghe's Library tagged → View Popular
Conditional-CSS
A tool that will generate browser specific CSS for you and package it all up in a C# HttpHandler (ASHX) so that it will deliver only the CSS for the browser that makes the request. Interesting idea to get around having to use browser hacks and still have all your code in one file for easy maintenance.
Linq: The Missing ToDictionary Extension Method Overload - Omer van Kloeten's .NET Zen
An extension method for getting a generic dictionary back from a collection of KeyValuePairs... just a bit of a shortcut from using the overload with two params, but handy.
-
public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> enumeration)
{
// Check to see that enumeration is not null
if (enumeration == null)
throw new ArgumentNullException("enumeration");
return enumeration.ToDictionary(item => item.Key, item => item.Value);
}
Yield and generics rock! - Tales from the Evil Empire
How to create a filter for generic lists (or other IEnumerable objects) without creating a temporary list first. Illustrates how to use the yield statement as well and create your own generic enumerator.
-
public sealed class FilteredEnumerable<T> : IEnumerable<T>, IEnumerable {
private IEnumerable<T> _enumerable;
private Predicate<T> _filter;
public FilteredEnumerable(IEnumerable<T> enumerable, Predicate<T> filter) : base() {
_enumerable = enumerable;
_filter = filter;
}
IEnumerator<T> IEnumerable<T>.GetEnumerator() {
foreach (T item in _enumerable) {
if (_filter == null || _filter(item)) {
yield return item;
}
}
}
IEnumerator IEnumerable.GetEnumerator() {
return (IEnumerator)(((IEnumerable<T>)this).GetEnumerator());
}
} -
string[] stringsToFilter = new string[] {"Red", "Green", "Blue", "Pink"};
Predicate<string> filter = delegate(string stringToFilter) {
return (stringToFilter.IndexOf('e') != -1);
};
filteredStrings = new FilteredEnumerable<string>(stringsToFilter, filter);
Microsoft Live Labs : Volta
A library that is similar to RJS in Ruby on Rails. It lets you write code in C# which can be spilt into tiers. The client tier is translated into the equivalent Javascript. Still a CTP and not sure how it fits in with ASP.Net (or if it does) yet.
Script#
An IDE tool for C# that compiles into Javascript. Looks to be similar to RJS in Ruby on Rails. Not sure if it's related to Volka. I wish they'd build something that did this with jQuery.
CodeProject: Load and display page contents asynchronously with full postback support. Free source code and programming help
A more Ajax-efficient version of the UpdatePanel - a PartialUpdatePanel. Less bandwidth usage than the regular update panel. It can also be set up to "instantiate" itself on the client instead of the server. Interesting use of an HTTPHandler to render the panel content.
Steven Smith : Render User Control as String Template
A generics variation of Scott Guthrie's code to render ASCX controls as HTML for Ajax consumption.
CodePlex.SpaceBlock - Home
An open-source Windows application written in .Net to manage your S3 account buckets and files. The most useful feature (that you don't have in S3 Fox) is the ability to generate a signed URL for sharing files with people.
The New Lambda Expressions Feature in C# 3.0
Code sample that compares performing the same function using anonymous functions, lambda and generic extensions. Good examples to see the differences in the syntax approaches.
Tip/Trick: Building a ToJSON() Extension Method using .NET 3.5 - ScottGu's Blog
Tutorial example of how to use object extension in .Net 3.5. Create a JSON convertor for an object. Interesting implications here, similar to prototyping in Javascript.
jsc (c# to javascript)
A "cross-compiler" that will take C# code and turn it into javascript, java or php. Not sure what the usefulness is yet but it's intriguing.
Threading in C# - Free E-book
- Some good information here both in background information on threading and code snippets. - bluecockatoo on 2006-08-24
Open Source Software in C#
- A website with a whole collection of C# resources for IDEs, code libraries, references, and coding tools all open source! - bluecockatoo on 2006-08-23
Wackylabs.Net » Flickr.Net API
- Flickr.Net API code and documentation site - bluecockatoo on 2006-08-23
GDI+ FAQ main index
- A good reference with tutorials and source code for GDI text and graphics manipulation in Winforms. - bluecockatoo on 2006-08-23
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in C#
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo
