如何使用Visual Studio中的LinqPad使用.dump()扩展方法? [英] How to use the LinqPad .Dump() extension method in Visual Studio?

查看:333
本文介绍了如何使用Visual Studio中的LinqPad使用.dump()扩展方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LINQPad是惊人的,特别有用的是转储()扩展方法这使得物体和几乎任何类型的结构,匿名与否,到控制台。

LINQPad is amazing, particularly useful is the Dump() extension methods which renders objects and structs of almost any type, anonymous or not, to the console.

起初,当我移动到Visual Studio 2010中,我试图让自己的使用委托来获取值来渲染匿名类型等,这是越来越转储方法pretty虽然复杂,而这很有趣和教育首先我需要的是一个坚实的实现。已经签出反射器的LINQPad code,我更放心,我不会得到执行权。

Initially, when I moved to Visual Studio 2010, I tried to make my own Dump method using a delegate to get the values to render for anonymous types etc. It's getting pretty complicated though and whilst it was fun and educational at first what I need is a solid implementation. Having checked out the LINQPad code in reflector I am even more assured that I'm not going to get the implementation right.

有没有免费的图书馆,我可以包括提供导出功能?

Is there a free library I can include to provide the Dump functionality?

推荐答案

看这里(你的路径可能会有所不同):

Look here (your path may vary):

C:\\ Program Files文件(x86)的\\微软的Visual Studio 10.0 \\样本\\ 1033 \\ CSharpSamples.zip \\ LinqSamples \\ ObjectDumper

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Samples\1033\CSharpSamples.zip\LinqSamples\ObjectDumper

这篇关于如何使用Visual Studio中的LinqPad使用.dump()扩展方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆