|
Not for advertisement, but take a look to the book "CLR via C#" by J. Richter. It's a nicely describe CLR and programming for CLR.
|
|
|
|
|
Yeah, I'm familiar with that name. I like to find more topics about that deepness in .NET.
|
|
|
|
|
Honestly the best way to learn how a runtime works is to learn how to debug it at the lowest levels. Read every single article here: Tess Ferrandez on MSDN[^]. Read if from start to end (well, actually end to start) and you should have really good in-depth knowledge (granted, reading and digesting that whole blog will probably take a few months). Real-world experience/stories sticks a lot better than raw theory (at least in my experience).
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb]
Jonathan C Dickinson (C# Software Engineer)
|
|
|
|
|
That blog is so useful. Thank you so much.
|
|
|
|
|
CLR via C# by J. Richter (though already mentioned above) would be my answer to a book.
There are some very good reads on msdn which go down in details of the framework.
Selective reading on http://www.wintellect.com/[^] will be useful for going in deep into the framework.
|
|
|
|
|
Perhaps you could download the source code of .Net framework and look into it:
http://referencesource.microsoft.com/netframework.aspx[^]
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
.NET is a layer on top of the WinAPI.
Learn that.
(WinAPI is a layer on top of HAL.DLL - you don't want to learn that)
|
|
|
|
|
can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash?
Please help answer, many thanks.....
|
|
|
|
|
What do you mean by "file system crash", and how do you think the app could recognise it?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
for example, a designated folder got changed, not able to write into it, the system shall pop up error message, right? so I have to make specific error exception/message for this kind of case, otherwise the system just gave general error message, am I right?
|
|
|
|
|
You would need to implement FileSystemWatcher, take a look at these links[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
As the inability to save to a certain location is a predictable exception (e.g. the user attempts to save into the Windows folder on Windows 7 when running with normal permissions), it's always a good idea to protect against this type of exception.
|
|
|
|
|
alexyxj wrote: can anyone help explain what might happen to a .NET application if file system
crash?
In general - no.
alexyxj wrote: How does your apps deal with file system crash?
Whatever the business requirements suggest and reasonable extrapolation from that.
For example I don't try to do anything at all about the file system filling up for a server. Can it happen? Yes. If it does what can I do? Nothing. I do however expect that any reasonable operations setup would take into account file system monitoring.
As another example if I can't read a configuration file that the server requires on start up then besides logging an error I can do one of the following
- Start with default values.
- Exit the server.
The choice depends on what was supposed to be in the configuration file that I was reading.
(Note that a logging solution MUST be implemented such that a logging failure does not stop the application from running.)
A stand alone user application should probably do something different. If it cannot read/write to the fle system then it should report that to the user.
|
|
|
|
|
Thanks Richard/Pete/jschell, you guys provided very helpful knowledge, appreciate!
|
|
|
|
|
|
I do I get description from Public Enum?
Public Enum API
'''
''' Using Google API
'''
<description("google api")=""> Google
'''
''' Using Yahoo API
'''
<description("yahoo api")=""> Yahoo
End Enum
API.Yahoo.Description not working
|
|
|
|
|
what programming language your are using and how you are trying to access the description?
Jibesh V P
|
|
|
|
|
You need Reflection . With that, you can retrieve the DescriptionAttribute .
Look at some articles on Enum Description Converters, e.g. Description Enum TypeConverter[^].
|
|
|
|
|
Those are XML-comments, and comments aren't compiled into the code. You could use a DescriptionAttribute as already mentioned, or you'd manually parse the generated XML.
|
|
|
|
|
Hopefully somebody can tell me what I’m doing wrong … I’ve never used an XML file before, so I’m obviously misunderstanding something ...
This XML file :
="1.0"="utf-8"
<Folders>
<TemplatesFolder>E:\Newsletter Templates (Email)\</TemplatesFolder>
<NewsLetterFolder>E:\Newsletters\</NewsLetterFolder>
</Folders>
Read by this code :
Do While (myXml.Read())
If myXml.IsStartElement() Then
If myXml.Name = "TemplatesFolder" Then
myXml.Read()
myTempFolder = myXml.Value
End If
If myXml.Name = "NewsLetterFolder" Then
myXml.Read()
myNlFolder = myXml.Value
End If
End If
Loop
Gives this error:
There are multiple root elements. Line 3, position 2.
|
|
|
|
|
Just a guess: The backslash/left-angle-bracket combination may be confusing the parser. The backslash character is sometimes used to "escape" the following character. If this is happening, it may not be recognizing the left-angle bracket or the end tag.
Maybe put the folder names in double quotes.
|
|
|
|
|
There is nothing wrong with the XML (presuming that your ascii looking text really is ascii text.)
You posted code that shows how you are attempting to parse the xml tree.
But how are you creating the tree in the first place?
|
|
|
|
|
Google XPath and SelectSingleNode... the code you have is about the worst possible way to deal with XML.
|
|
|
|
|
Hi
Use this script to initialize a dos program:
Dim myprocess As New Process
Dim StartInfo As New System.Diagnostics.ProcessStartInfo
Public Sub Audio128(ByVal MyPathandFilename As String, ByVal MyFileName As String)
StartInfo.FileName = MyProgram.exe
StartInfo.RedirectStandardInput = True
StartInfo.RedirectStandardOutput = True
StartInfo.UseShellExecute = False
myprocess.StartInfo = StartInfo
myprocess.Start()
The script works fine but the prompt is displayed while the program EXE works.
Is possible to hide it?
Thanks in advance
|
|
|
|
|
Hi,
Try
StartInfo.WindowStyle = ProcessWindowStyle.Hidden
Hope this helps.
In some cases, my signature will be longer than my message...
<em style="color:red"> <b>ProgramFOX</b></em> ProgramFOX
|
|
|
|