Skip to main content
gamedev.net
🔒 Locked

Easy .NET framework question

Started by Beowulf_ 2 replies 350+ views
Original Post
Beowulf_
Beowulf_
I think this is one of those issues that is so basic no-one bothers to mention it. In visual studio .net, c#, I can only access some of the namespaces. I''m creating a console application, and I''m trying to use the System.Text.RegularExpressions namespace, but it doesn''t appear to exist. Even when I type it in anyway it doesn''t work. Is there some obvious solution? Can you not access everything from a console app, do you have to include the other namespaces specifically? How does this work?
Arild Fines
Arild Fines
You always have to add references to the assemblies in which the namespace you wish to access reside. However, System.Text.RegularExpressions is in the System.dll assembly, which should be referenced by default in all types of projects anyway. Maybe you''ve somehow managed to remove that reference?



For those who believe in God, most of the big questions are answered. But for those of us who can''t readily accept the God formula, the big answers don''t remain stone- written. We adjust to new conditions and discoveries. We are pliable. Love need not be a command or faith a dictum. I am my own God. We are here to unlearn the teachings of the church, state, and our educational system. We are here to drink beer. We are here to kill war. We are here to laugh at the odds and live our lives so well that Death will tremble to take us -- Charles Bukowski
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
BurntToast
BurntToast
Another thing to check (I''ve only played around with it a little and haven''t used System.Text.RegularExpressions, so I''m not sure)... but (I think) some of the namespaces were changed between the beta version and version 1 - so it''s possible the method you''re looking for is in a different namespace if you''re following a tutorial or something that was written for the beta version.

If you can''t find it anywhere, this might be the reason... otherwise, about the only thing left is that you haven''t added a reference to it.
BurntToast
BurntToast
Done a little bit of checking, it''s definitely in version 1, so I''m not sure what your problem could be.

Found a good article on the subject though, never know... might point you in the right direction:

http://www.dotnet247.com/247reference/a.aspx?u=http://www.4guysfromrolla.com/webtech/chapters/ASPNET2/ch02.3.shtml

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.