No code snippets built in yet for C# ASP.NET 2.0 beta?

  • Thread starter Thread starter Steve Franks
  • Start date Start date
S

Steve Franks

I'm using VS.NET 2005 beta 2 and am excited about the idea of using code
snippets. This is a nice time saver. For example I need to read all text
from a file, and see that with a simple command VB.NET will do this for me
nicely.

However in order for this to work it must be in VB.NET, and all my code is
in C#. Are any of the built-in snippets available yet for C# users? Any
way around this?

For now I've created a utility class as my only VB.NET based class. Then I
use the snippet in there and return a string. So this is an extra step that
I'd rather avoid (as it starts to defeat the purposes of builtin snippets to
jump through these hoops) but all in all its still worth it for now I guess.

What do you guys think?

Steve
 
Hi,

I think you are talking about the 'My' class available in VB.NET 2005. There
is a wrapper available for C# users at
http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=8
(Search for 'My for C# 2.0') by Juval Lowy. Check it out.

HTH

I'm using VS.NET 2005 beta 2 and am excited about the idea of using code
snippets. This is a nice time saver. For example I need to read all text
from a file, and see that with a simple command VB.NET will do this for me
nicely.

However in order for this to work it must be in VB.NET, and all my code is
in C#. Are any of the built-in snippets available yet for C# users? Any
way around this?

For now I've created a utility class as my only VB.NET based class. Then I
use the snippet in there and return a string. So this is an extra step that
I'd rather avoid (as it starts to defeat the purposes of builtin snippets to
jump through these hoops) but all in all its still worth it for now I guess.

What do you guys think?

Steve
 
With VS.NET, it was announced that developers would be able
to create and distribute their own customized code snippets.

That isn't implemented yet and when you try to search for snippets,
VS.NET just spins its wheels.

When that feature comes online, it should be a powerful tool.




Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
===========================
 
Back
Top