MCTS Exam 70-536 – COM Interop
Mittwoch, 26. Mai 2010Hello everyone, big steps this week toward my goal. As usual, I share my notes about this topic with you. Hope it helps you while you are preparing
Using COM from .NET
Hello everyone, big steps this week toward my goal. As usual, I share my notes about this topic with you. Hope it helps you while you are preparing
Using COM from .NET
Keep on learning, keep on writing. Today I publish my notes regarding Security in .NET, especially the RBS System.
The main difference between the Generic Classes Lookup and Dictionary is the uniqueness of the Key. While Dictionarys can only have a Key-Value once,
in Lookup it can occur multiple times.
Declaration is the same.
Lookup<int,string> myLookup = new Lookup<int,string>();
vs.
Dictionary<int,string> myDic = new Dictionary<int,string>();
Furter Reading:
* A nice article about using ToDictionary and ToLookup in Linq can be found @blog.donnfelker.com
I got this message yesterday, while trying to save changes into entity framework. the whole thing was within an ASHX-Handler and I couldn’t figure out , what the deal was.
Now I found a solutions. Just add the following line at the beginning of your method /codeblock and you are fine:
C#
System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("de-DE");
VB.net
System.Threading.Thread.CurrentThread.CurrentUICulture = _
New System.Globalization.CultureInfo("de-DE")
My preferred .NET-language is C#, but as a consultant I have to write VB every once in a while. Here is a little introduction, how my beloved
Extension Methods work in VB.Net.
Just two steps:
Step1 – Create a new Module called for example “StringExtensions.vb” and add an Import –Statement for System.Runtime.CompilerServices
Step2 – Write your Extension Method, and put an <Extension()> directive on top. Here is an example:
<Extension()> _
Public Function AddAbcX(ByVal mystring As String) As String
Return myString + "ABC"
End Function
Notice the _ behind the directive. Don’t forget this one.
You notive one additional thing. A while ago I read an article about Extension Methods and got the suggestion to add an X to each methodname.
So, if using intellisense, you will see directly if the method you’re about to call is an Extension Method or a build-in Method. Good idea I think.
Another suggestion – Put the method in the same namespace as the object it belongs to (I said namespace, not file!).
So you have your methods ready when you start using the object.
Cheers
Sascha
Hello everyone,
I wish all of you a relaxing and successful 2010. See you on the other side
)
Sascha
As you might now, Microsoft has released the first beta for Silverlight 4 a few days ago. More about this beta, and other Silverlight related topics can be found on my Blog about Silverlight.
Cheers
Sascha
Hello everyone,
I just checked, and found that now everyone can download the new Beta 2 of VS2010 and .NET Framework 4. Have fun trying, I know I will.
Download: Microsofts Visual Studio Page
Good News everyone !
For the fact that I’m faster in reading then in wring, I made a lot of progress in exam preparation and I’m a bit behind with my notes. Anyway, I share my notes about this topic with you today
Good morning,
today I start with Collections and Dictionaries during my MCTS exam-preparation. As usual I provide my notes on that topic as a little help and motivation for other students.
Bad Behavior has blocked 35 access attempts in the last 7 days.