RegularExpressions
-
Hi! I'm trying out the regular expressions in C# (.NET); but I can't compile my source. The compiler complains about not recognizing "RegularExpressions". Fair enough, I thought. I just need a reference, right? I have "using System.Text.RegularExpressions;" at the top of my file, of course. Problem is I can't add an assembly reference! When trying to I can't find the System.Text.RegularExpressions dll! I actually tried to seach my whole drive for it, and the only one found was in the compact framework and I can't add that one. What am I doing wrong here? PS.: Funny thing is, that the samples folder from the SDK (or maybe the IDE) contains some regular expressions samples with both source and .exe and I can run the .exe without problems (which uses the required dll at runtime)....
-
Hi! I'm trying out the regular expressions in C# (.NET); but I can't compile my source. The compiler complains about not recognizing "RegularExpressions". Fair enough, I thought. I just need a reference, right? I have "using System.Text.RegularExpressions;" at the top of my file, of course. Problem is I can't add an assembly reference! When trying to I can't find the System.Text.RegularExpressions dll! I actually tried to seach my whole drive for it, and the only one found was in the compact framework and I can't add that one. What am I doing wrong here? PS.: Funny thing is, that the samples folder from the SDK (or maybe the IDE) contains some regular expressions samples with both source and .exe and I can run the .exe without problems (which uses the required dll at runtime)....
-
After searching Google groups I found out what to do. I needed to add a reference to System.dll in VS. I was under the impression that the System namespace was referenced by default? :omg:
The name of the DLL (or assembly) is completely unrelated to which namespaces the types it implements are in. The 'core' namespaces are spread between mscorlib.dll and System.dll. The most critical ones that are required for even the most basic bootstraping are in mscorlib.dll. This isn't just the System namespace, but Collections, IO, Reflection, Remoting, Serialization, Security, etc. The ones that other things don't depend on as much and hence may never need to be loaded are in System.dll. This includes CodeDom, ComponentModel, Net, RegularExpressions, etc. Don't let the names of the other DLL's fool you either, for example System.Data.dll mostly implements types from the System.Data namespace, but it also implements some types that are in System.Xml and so forth. -Blake
-
The name of the DLL (or assembly) is completely unrelated to which namespaces the types it implements are in. The 'core' namespaces are spread between mscorlib.dll and System.dll. The most critical ones that are required for even the most basic bootstraping are in mscorlib.dll. This isn't just the System namespace, but Collections, IO, Reflection, Remoting, Serialization, Security, etc. The ones that other things don't depend on as much and hence may never need to be loaded are in System.dll. This includes CodeDom, ComponentModel, Net, RegularExpressions, etc. Don't let the names of the other DLL's fool you either, for example System.Data.dll mostly implements types from the System.Data namespace, but it also implements some types that are in System.Xml and so forth. -Blake