|
The answer to this depends entirely on what you mean by paint brush and by using mouseevent.
Can you explain a little more clearly?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
theré's all kinds of brushes. This little article[^] shows what a gradient brush can do for you; but maybe all you want is a SolidBrush?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
I created a proxy that listens on a port for a requests, and then redirects them to a server. For that I created a listening socket, and a client socket that streams the data.
The problem is that the server is using Authentication (for instance NTLM, or digest) and I need to authenticate the request.
I know that I can do it in a webrequest, using CredentialCache object; something like this:
CredentialCache credCache = new CredentialCache();
if ((auth & (uint)EAuthenticationFlags.eWindows) != 0) {
credCache.Add(URL, "Negotiate", (NetworkCredential) CredentialCache.DefaultCredentials);}
webRequest.Credentials = credCache;
However, I am unsure how to do it if all I have in my hand is a socket and a stream of data. Something like this:
ClientSocket.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, new AsyncCallback(this.OnClientReceive), ClientSocket);
DestinationSocket.BeginReceive(RemoteBuffer, 0, RemoteBuffer.Length, SocketFlags.None, new AsyncCallback(this.OnRemoteReceive), DestinationSocket);
And the code for the callbacks [b]OnClientReceive[/b] and [b]OnRemoteReceive[/b]:
protected void OnClientReceive(IAsyncResult ar)
{
try
{
int Ret = ClientSocket.EndReceive(ar);
if (Ret <= 0)
{
Dispose();
return;
}
DestinationSocket.BeginSend(Buffer, 0, Ret, SocketFlags.None, new AsyncCallback(this.OnRemoteSent), DestinationSocket);
}
catch
{
Dispose();
}
}
protected void OnRemoteReceive(IAsyncResult ar)
{
try
{
int Ret = DestinationSocket.EndReceive(ar);
if (Ret <= 0)
{
Dispose();
return;
}
ClientSocket.BeginSend(RemoteBuffer, 0, Ret, SocketFlags.None, new AsyncCallback(this.OnClientSent), ClientSocket);
}
catch
{
Dispose();
}
}
Does anybody has any suggestions of where the authentication should take place and how? Can I append a credentials object somehow to the socket o or to the stream of data? or worst case scenario, can I just append the correct http headers?
Thanks in advance for your time,
cheers,
Jo
|
|
|
|
|
List < string > lst = new List < string > ();
lst.Add("FirstValue");
lst.Add("SecondValue");
lst.Add("ThirdValue");
lst.Add("FourthValue");
Dictionary < string , int > dic = new Dictionary < string , int > ();
dic = lst.ToDictionary < string , int > ( ???? )
|
|
|
|
|
If you say why you want to do this and what the int value represents, it would be easier to advise you,
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
int is value of repeated string.
suppose lst.Add("this");
lst.Add("this");
Console.Write(dic["this"]) // will be 2 because of repeatation of "this".
|
|
|
|
|
this is known that same Key will throw exception but when key is repeated int is incremented and key will not register ( as it will throw exception)
|
|
|
|
|
try this:
public partial class ListToDictionaryTestForm : Form
{
List<string> testList = new List<string>();
public ListToDictionaryTestForm()
{
InitializeComponent();
testList.Add("one");
testList.Add("One");
testList.Add("two");
testList.Add("three");
testList.Add("one");
testList.Add("three");
testList.Add("one");
OutputResults(testList);
}
private void OutputResults(List<string> testList)
{
var itemcounts = from s in testList
group s by s into g
select new
{
key = g.Key,
val = g.Count()
};
Dictionary<string, int> results = itemcounts.ToDictionary(k => k.key, v => v.val);
foreach (KeyValuePair<string, int> kvp in results)
{
lboxResults.Items.Add(string.Format("{0} : {1}", kvp.Key, kvp.Value));
}
}
}
This is just a Form with a ListBox on it.
I've just realized that this can be abbreviated slightly:
private void OutputResults(List<string> testList)
{
Dictionary<string, int> results = (from s in testList
group s by s into g
select new
{
key = g.Key,
val = g.Count()
}).ToDictionary(k => k.key, v => v.val);
foreach (KeyValuePair<string, int> kvp in results)
{
lboxResults.Items.Add(string.Format("{0} : {1}", kvp.Key, kvp.Value));
}
}
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Friday, July 31, 2009 11:38 AM
|
|
|
|
|
However that doesn't satisfy the requirement "without using loop?"
you'll need stronger lambda magic, or an entirely different kind of Force!
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hey! Play fair. It only uses the loop, at least explicitly, to demonstrate that it has worked.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
as Dan points out below, there is a hidden loop in your magic, and as you said there is a visible one you don't need, so your solution actually contains two loops, that's way too much.
FWIW: The only way I see without loops is with recursion
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: as Dan points out below, there is a hidden loop in your magic
That's why I explicitly said explicitly.
Luc Pattyn wrote: FWIW: The only way I see without loops is with recursion
Hadn't thought about that. You're probably correct, although isn't that a form of looping? In fact, isn't it a double loop? Once on the way through getting the results, and again whilst unwinding the recursion stack?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Haven't seen a book yet that lists recursion as a loop construct; normally they only mention things such as for, while and do.
One must be careful, if the code is written in such a way that tail recursion is possible, then sooner or later (probably later) MS may come with a C# compiler that turns the recursive code into a loop, which to the OP (or his teacher?) would be unacceptable.
Going one step further, our computers execute loops all the time: fetch instruction, decode instruction, execute instruction; whether coded in micro-code or implemented in parallel hardware, each little piece is doing its job over and over. So maybe it can't be done? Or maybe yours is the solution they wanted...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: you'll need stronger lambda magic,
You're still using a loop then, you're just applying a layer of obfuscation to hide it.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
this is a bad question ya know?
what is supposed to go in the dictionary?
I can only make some guess....
first you can't avoid a loop, so here woud be one
Rand r = new Random();<br />
foreach(var s in lst) dic[rand.Netx()] = s;
but maybe we could use some LINQ magic to hide the loop?
Random r = new Random();<br />
Dictionary<int , string> dic = new Dictionary<int , string>();<br />
dic = lst.ToDictionary <string, int>(s => r.Next());
How about that?!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
StreamReader bfr = File.OpenText(@"D:\Documents and Settings\home\Desktop\normal.txt");
Dictionary < string , int > dic = new Dictionary < string , int > ();
string[] str = bfr.ReadToEnd().Replace("\r","").Replace("\n"," ").Replace(" "," ").Split(' ');
int var = 1;
foreach (string i in str)
{
if(dic.TryGetValue(i,out var))
dic[i]++;
else
dic.Add(i,1);
}
foreach(KeyValuePair < string , int > i in dic)
if(i.Value > 1)
Console.WriteLine(i.Key + " " + i.Value);
Console.ReadLine();
THIS WAS THE TASK BUT I HAVE DONE IT USING LOOP.
I WANT IT TO BE DONE without USING LOOP
|
|
|
|
|
If I understand your question correctly, you want a List<string> which looks like this:
Value1
Value2
Value3
Value4
Value1
to be converted to a Dictionary<string, int> which looks like this:
{Value1, 2}
{Value2, 1}
{Value3, 1}
{Value4, 1}
The problem is that the first argument of ToDictionary should provide a method to get the key from the value. You want to get the value from the key, so ToDictionary probably won't help you here. You could probably create a LINQ expression which provides a collection of KeyValuePair<string, int>, but IMHO it may not be worth it. It may be quicker to just bite the bullet and use a loop - ToDictionary does this behind the scenes anyway.
However, if you really dislike looping, then try something like this:
var keyValuePairs = from string key in lst.Distinct() select new KeyValuePair<string, int>(key,
lst.Count(
(string str) => (key == str))
);
That should provide you with a list of KeyValuePairs. I'm not certain how to get those KeyValuePairs into a Dictionary, (maybe a cast or AddRange?) but it's a start.
Note: There may be syntax errors in that snippet; I wrote that in the browser, so the compiler hasn't done any error checking
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
thankssssssssssssss
As you help people. God will help you..
Thanks again..
|
|
|
|
|
You have no choice but to use a loop. Even if you wrote your own Dictionary class to handle incrementing the value every time the same string gets added.
You'll either be using a loop inside your custom Dictionary as you go through each item passed in by some kind of AddRange method, or you'll be using a loop to iterate over a list of strings to pass to your custom Dictionary's Add method.
|
|
|
|
|
Hey if someone could help me to understand how to fix this issue I am having I would greatly appreciate it.
Problem:
I am developing a c# application, in doing so the I am currently using application properties because I could not figure out how to use the xml method of storing and retrieving settings. Ultimately I would like to use my own xml file and not use system properties but I am in need of some training for that. I can be contacted on skype at mgassist or jollymansart. Back to the issue. I need to be able to programmaticlly update the property setting. I do not know how to programmaticlly update the system property. mgeorge@peerassistllc.com.
Here is what the xml file looks like from the application settings:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PeerAssistLoader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PeerAssistLoader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings />
<applicationSettings>
<PeerAssistLoader.Properties.Settings>
<setting name="AppLoaderConnectionString" serializeAs="String">
<value>Password=zephyr;Persist Security Info=True;User ID=mike;Initial Catalog=AppLoader;Data Source=PA-DEVplatform1\sql2005</value>
</setting>
<setting name="DefaultWSPath" serializeAs="String">
<value>Please Place the default Workstation Path</value>
</setting>
<setting name="DefaultMSAccess" serializeAs="String">
<value>C:\Program Files\Microsoft Office\Office12\msaccess.exe</value>
</setting>
</PeerAssistLoader.Properties.Settings>
</applicationSettings>
<userSettings>
<PeerAssistLoader.Properties.Settings>
<setting name="DefaultSNVPath" serializeAs="String">
<value>Please Place the default Server Path</value>
</setting>
</PeerAssistLoader.Properties.Settings>
</userSettings>
</configuration>
|
|
|
|
|
Here you go, an (inline) alternative to App Config
(tested and used a lot.. I'm just too lazy to make an article about it...)
<br />
public class ConfigFile<br />
{<br />
#region GetDefaultPath(..)<br />
<br />
public static string GetDefaultPath()<br />
{<br />
return GetDefaultPath(ConfigurationFolder.LocalApplicationData, null);<br />
}<br />
public static string GetDefaultPath(ConfigurationFolder folder)<br />
{<br />
return GetDefaultPath(folder, null);<br />
}<br />
public static string GetDefaultPath(ConfigurationFolder folder, string name)<br />
{<br />
string dir = AppInfo.GetDataDirectory(folder);<br />
if (string.IsNullOrEmpty(name))<br />
name = AppInfo.AppName;<br />
return Path.Combine(dir, string.Format("{0}.config", name.PathSafe()));<br />
}<br />
<br />
#endregion<br />
<br />
#region GetShared config files<br />
<br />
public static ConfigFile GetShared()<br />
{<br />
return GetShared(GetDefaultPath());<br />
}<br />
public static ConfigFile GetShared(ConfigurationFolder folder)<br />
{<br />
return GetShared(GetDefaultPath(folder));<br />
}<br />
public static ConfigFile GetShared(ConfigurationFolder folder, string name)<br />
{<br />
return GetShared(GetDefaultPath(folder, name));<br />
}<br />
public static ConfigFile GetShared(string path)<br />
{<br />
lock (configFiles)<br />
{<br />
ConfigFile result;<br />
if (!configFiles.TryGetValue(path, out result))<br />
{<br />
result = new ConfigFile(path);<br />
configFiles[path] = result;<br />
}<br />
return result;<br />
}<br />
}<br />
<br />
static Dictionary<string, ConfigFile> configFiles = new Dictionary<string, ConfigFile>();<br />
<br />
public static void SaveAll()<br />
{<br />
lock (configFiles)<br />
{<br />
foreach (var cf in configFiles.Values)<br />
cf.Save();<br />
}<br />
}<br />
<br />
#endregion<br />
<br />
#region instance methods: Save(), Reload(), GetSection<T>()<br />
<br />
XDict config = new XDict();<br />
<br />
public ConfigFile(string path)<br />
{<br />
FilePath = path;<br />
if (string.IsNullOrEmpty(path))<br />
throw new ArgumentNullException("path");<br />
Reload();<br />
}<br />
<br />
public string FilePath { get; private set; }<br />
<br />
public void Save()<br />
{<br />
string dir = Path.GetDirectoryName(FilePath);<br />
if (!Directory.Exists(dir))<br />
Directory.CreateDirectory(dir);<br />
<br />
XDocument doc = new XDocument(config.ToXNode());<br />
doc.Save(FilePath);<br />
}<br />
<br />
public void Reload()<br />
{<br />
if (File.Exists(FilePath))<br />
try<br />
{<br />
XDocument doc = XDocument.Load(FilePath);<br />
XElement xdict = doc.Root;<br />
config = new XDict();<br />
if (xdict != null)<br />
config.FromXNode(xdict);<br />
}<br />
catch (InvalidOperationException) { }<br />
catch (XmlException) { }<br />
}<br />
<br />
public XDict GetSection<T>()<br />
{<br />
string key = typeof(T).FullName;<br />
XDict section = config.Get<XDict>(key);<br />
if (section == null)<br />
{<br />
section = new XDict();<br />
config[key] = section;<br />
}<br />
return section;<br />
}<br />
<br />
#endregion<br />
}<br />
<br />
public interface IXObject : IXmlSerializable<br />
{<br />
XNode ToXNode();<br />
void FromXNode(XNode node);<br />
}<br />
<br />
public class XValue : IXObject<br />
{<br />
public XValue() { }<br />
public XValue(string s) { StringValue = s; }<br />
<br />
public string StringValue { get; set; }<br />
<br />
public override string ToString()<br />
{<br />
return StringValue;<br />
}<br />
<br />
#region Strongly Typed Value<br />
<br />
public T Get<T>()<br />
{<br />
return Get<T>(default(T));<br />
}<br />
public T Get<T>(T defaultVal)<br />
{<br />
T ret;<br />
if (!string.IsNullOrEmpty(StringValue))<br />
{<br />
if (Converter.TryGetTValue<T>(StringValue, out ret))<br />
return ret;<br />
StringValue = null;<br />
}<br />
return defaultVal;<br />
}<br />
<br />
public void Set<T>(T val)<br />
{<br />
Set<T>(val, default(T));<br />
}<br />
public void Set<T>(T val, T defaultVal)<br />
{<br />
if (Equals(val, defaultVal))<br />
{<br />
StringValue = null;<br />
}<br />
else<br />
{<br />
string ret;<br />
if (Converter.TryGetStringValue<T>(val, out ret))<br />
StringValue = ret;<br />
}<br />
}<br />
<br />
#endregion<br />
<br />
#region static IXObject Create(XNode node)<br />
<br />
internal static IXObject Create(XNode node)<br />
{<br />
if (node == null)<br />
return null;<br />
if (node is XText)<br />
{<br />
XValue val = new XValue();<br />
val.FromXNode(node);<br />
return val;<br />
}<br />
else if (node is XElement)<br />
{<br />
XElement xe = (XElement)node;<br />
switch (xe.Name.LocalName)<br />
{<br />
case "list":<br />
XList xl = new XList();<br />
xl.FromXNode(xe);<br />
return xl;<br />
case "dictionary":<br />
XDict xd = new XDict();<br />
xd.FromXNode(xe);<br />
return xd;<br />
}<br />
}<br />
return null;<br />
}<br />
<br />
#endregion<br />
<br />
#region IXObject Members<br />
<br />
public XNode ToXNode()<br />
{<br />
var s = StringValue;<br />
if (s == null)<br />
s = "";<br />
return new XText(s);<br />
}<br />
<br />
public void FromXNode(XNode node)<br />
{<br />
XText t = node as XText;<br />
if (t != null)<br />
StringValue = t.Value;<br />
}<br />
<br />
#endregion<br />
<br />
#region IXmlSerializable Members<br />
<br />
public XmlSchema GetSchema()<br />
{<br />
return null;<br />
}<br />
<br />
public void ReadXml(XmlReader reader)<br />
{<br />
try<br />
{<br />
reader.Read();<br />
XNode node = XNode.ReadFrom(reader);<br />
FromXNode(node);<br />
}<br />
catch (InvalidOperationException) { }<br />
catch (XmlException) { }<br />
}<br />
<br />
public void WriteXml(XmlWriter writer)<br />
{<br />
ToXNode().WriteTo(writer);<br />
}<br />
<br />
#endregion<br />
}<br />
<br />
public class XList : List<IXObject>, IXObject<br />
{<br />
public override string ToString()<br />
{<br />
StringBuilder sb = new StringBuilder("[");<br />
for (int i = 0; i < 10 && i < Count; i++)<br />
{<br />
if (i > 0)<br />
sb.Append(", ");<br />
sb.Append(this[i]);<br />
}<br />
if (Count > 9)<br />
sb.Append(", ...");<br />
sb.Append("]");<br />
return sb.ToString(); ;<br />
}<br />
<br />
#region IXObject Members<br />
<br />
public XNode ToXNode()<br />
{<br />
XElement top = new XElement("list");<br />
foreach (var item in this)<br />
{<br />
top.Add(new XElement("item", item.ToXNode()));<br />
}<br />
return top;<br />
}<br />
<br />
public void FromXNode(XNode node)<br />
{<br />
XElement xe = node as XElement;<br />
if (xe == null || xe.Name != "list")<br />
return;<br />
foreach (XElement item in xe.Elements("item"))<br />
{<br />
XNode itemNode = item.FirstNode;<br />
Add(XValue.Create(itemNode));<br />
}<br />
}<br />
<br />
#endregion<br />
<br />
#region IXmlSerializable Members<br />
<br />
public XmlSchema GetSchema()<br />
{<br />
return null;<br />
}<br />
<br />
public void ReadXml(XmlReader reader)<br />
{<br />
try<br />
{<br />
reader.Read();<br />
XNode node = XNode.ReadFrom(reader);<br />
FromXNode(node);<br />
}<br />
catch (InvalidOperationException) { }<br />
catch (XmlException) { }<br />
}<br />
<br />
public void WriteXml(XmlWriter writer)<br />
{<br />
ToXNode().WriteTo(writer);<br />
}<br />
<br />
#endregion<br />
}<br />
public class XDict : Dictionary<string, IXObject>, IXObject<br />
{<br />
public override string ToString()<br />
{<br />
StringBuilder sb = new StringBuilder("{");<br />
int i = 0;<br />
foreach (var item in this)<br />
{<br />
if (i > 0)<br />
sb.Append(", ");<br />
i++;<br />
sb.Append(item.Key);<br />
sb.Append(": ");<br />
sb.Append(item.Value);<br />
}<br />
if (Count > 9)<br />
sb.Append(", ...");<br />
sb.Append("}");<br />
return sb.ToString(); ;<br />
}<br />
<br />
public new IXObject this[string key]<br />
{<br />
get<br />
{<br />
IXObject result;<br />
TryGetValue(key, out result);<br />
return result;<br />
}<br />
set<br />
{<br />
if (value == null)<br />
Remove(key);<br />
else<br />
base[key] = value;<br />
}<br />
}<br />
<br />
#region Strongly Typed Helper<br />
<br />
public T Get<T>(string key)<br />
{<br />
return Get<T>(key, default(T));<br />
}<br />
public T Get<T>(string key, T defaultVal)<br />
{<br />
IXObject xo;<br />
TryGetValue(key, out xo);<br />
if (typeof(IXObject).IsAssignableFrom(typeof(T)))<br />
{<br />
if (xo is T && xo != null)<br />
return (T)xo;<br />
return defaultVal;<br />
}<br />
<br />
XValue xv = xo as XValue;<br />
T ret;<br />
if (xv != null && !string.IsNullOrEmpty(xv.StringValue))<br />
{<br />
if (Converter.TryGetTValue<T>(xv.StringValue, out ret))<br />
return ret;<br />
}<br />
Remove(key);<br />
return defaultVal;<br />
}<br />
<br />
public void Set<T>(string key, T val)<br />
{<br />
Set<T>(key, val, default(T));<br />
}<br />
public void Set<T>(string key, T val, T defaultVal)<br />
{<br />
if (typeof(IXObject).IsAssignableFrom(typeof(T)))<br />
{<br />
IXObject xo = val != null ? (IXObject)val : (IXObject)defaultVal;<br />
this[key] = xo;<br />
return;<br />
}<br />
<br />
XValue xval;<br />
if (Equals(val, defaultVal))<br />
{<br />
xval = null;<br />
}<br />
else<br />
{<br />
string ret;<br />
if (Converter.TryGetStringValue<T>(val, out ret))<br />
xval = new XValue(ret);<br />
else<br />
xval = null;<br />
}<br />
if (xval == null)<br />
Remove(key);<br />
else<br />
this[key] = xval;<br />
}<br />
<br />
#endregion<br />
<br />
#region IXObject Members<br />
<br />
public XNode ToXNode()<br />
{<br />
XElement top = new XElement("dictionary");<br />
foreach (var item in this.Keys)<br />
{<br />
XElement xitem = new XElement("item", this[item].ToXNode());<br />
xitem.Add(new XAttribute("key", item));<br />
top.Add(xitem);<br />
}<br />
return top;<br />
}<br />
<br />
public void FromXNode(XNode node)<br />
{<br />
XElement xe = node as XElement;<br />
if (xe == null || xe.Name != "dictionary")<br />
return;<br />
foreach (XElement item in xe.Elements("item"))<br />
{<br />
string name = item.Attribute("key").Value;<br />
XNode itemNode = item.FirstNode;<br />
this[name] = XValue.Create(itemNode);<br />
}<br />
}<br />
<br />
#endregion<br />
<br />
#region IXmlSerializable Members<br />
<br />
public XmlSchema GetSchema()<br />
{<br />
return null;<br />
}<br />
<br />
public void ReadXml(XmlReader reader)<br />
{<br />
try<br />
{<br />
reader.Read();<br />
XNode node = XNode.ReadFrom(reader);<br />
FromXNode(node);<br />
}<br />
catch (InvalidOperationException) { }<br />
catch (XmlException) { }<br />
}<br />
<br />
public void WriteXml(XmlWriter writer)<br />
{<br />
ToXNode().WriteTo(writer);<br />
}<br />
<br />
#endregion<br />
}<br />
<br />
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
That smells like an Article, to me!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ho.. ok, well I might do an extra effort this week end!
Caught in my own trap!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Thanks a lot that was very helpful!
|
|
|
|
|
Good!
Now I should write an article about that!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|