Below is a very good article describing the almost complete list of difference that VB.NET has with C#.
It basically compares one to one keywords and functions for both the languages.
It could be extremely useful for people who find it difficult to transit from VB.NET to C#
http://www.codeproject.com/dotnet/vbnet_c__difference.asp
--Ashutosh
Wednesday, May 23, 2007
Tuesday, May 8, 2007
Providing Custom Intellisense in VS.NET IDE (Thanks to Mikhail Arkhipov)
In the previous post I tried to validate my HTML in the VS.NET designer for HTML usingmy own custom validations.
While this proved quite helpful, I felt a deep need of intellisense in VS.NET for my objects and hense decided to implement the same.
After a bit of googling and researching, I could find a possible way of implementing the same.
Here's how it goes.
As we all know, VS 2005 implements Intellisense using the XSD files. So the idea was to provide VS IDE with my own XSD so that it could use that XSD instead of the default one.
The process involved the following steps:
1. Create your custom XSD:
2. Make this XSD available to VS.NET IDE
3. Using the custom XSD
While this proved quite helpful, I felt a deep need of intellisense in VS.NET for my objects and hense decided to implement the same.
After a bit of googling and researching, I could find a possible way of implementing the same.
Here's how it goes.
As we all know, VS 2005 implements Intellisense using the XSD files. So the idea was to provide VS IDE with my own XSD so that it could use that XSD instead of the default one.
The process involved the following steps:
1. Create your custom XSD:
2. Make this XSD available to VS.NET IDE
3. Using the custom XSD
Thursday, May 3, 2007
Providing Custom Validations in VS.NET IDE
Hi all,
Just recently, working on Reporting system, I was required to create PDF reports out of HTML pages. I did those successfully using iTextSharp, a free online library for rendering PDFs from HTML.
In the process, I had to customize the particular HTMLs to contain several constraints and hense I had to validate them at the design level.
I found a great designer that did the trick. The well known Visual Studio.NET Designer. I decided to use that for my purpose as it did nost ofthe validations all by itself and I just had to add a few more of my custom ones.
Say for example, in my report, I was always required to have three DIVs in my tag in HTML, namely "HEADER", "FOOTER" and "DETAIL"
Now by default there is not such binding for user in case he is making it a regular HTML. But if it a Report then I had to put these validation checks.
For this I had to tweak the Designer to throw messages to the user if required.
The best way out seemed to be MACROS at that is what did the trick.
While creating any macro or a module in a macro project, we always have one Module in it "EnvironmentEvents". This module contains all events pertaining to all the events that occur in the Visual Studio IDE.
In the EnvironmentEvents module, choose the event
"DocumentEvents_DocumentSaved"
This event will be called every time a document is saved in Visual Studio IDE.
Here in you could have all your validations and all those will be thrown back to IDE using your own system of exception throwing, which could possibly be via MessageBox or some message in Output Window etc.
Now in order to get the items into Output window or task list, we can use the following piece of code.
Dim projItem As EnvDTE.Solution
Dim tw As TaskList = CType(win.Object, TaskList)
win = projItem.DTE.Windows.Item(Constants.vsWindowKindTaskList)
tw = CType(win.Object, TaskList)tw.TaskItems.Add("ErrorCategory", Document.Name, "Error Message", vsTaskPriority.vsTaskPriorityHigh, , True, Document.Name, -1, True, True)
-- Ashutosh
Just recently, working on Reporting system, I was required to create PDF reports out of HTML pages. I did those successfully using iTextSharp, a free online library for rendering PDFs from HTML.
In the process, I had to customize the particular HTMLs to contain several constraints and hense I had to validate them at the design level.
I found a great designer that did the trick. The well known Visual Studio.NET Designer. I decided to use that for my purpose as it did nost ofthe validations all by itself and I just had to add a few more of my custom ones.
Say for example, in my report, I was always required to have three DIVs in my tag in HTML, namely "HEADER", "FOOTER" and "DETAIL"
Now by default there is not such binding for user in case he is making it a regular HTML. But if it a Report then I had to put these validation checks.
For this I had to tweak the Designer to throw messages to the user if required.
The best way out seemed to be MACROS at that is what did the trick.
While creating any macro or a module in a macro project, we always have one Module in it "EnvironmentEvents". This module contains all events pertaining to all the events that occur in the Visual Studio IDE.
In the EnvironmentEvents module, choose the event
"DocumentEvents_DocumentSaved"
This event will be called every time a document is saved in Visual Studio IDE.
Here in you could have all your validations and all those will be thrown back to IDE using your own system of exception throwing, which could possibly be via MessageBox or some message in Output Window etc.
Now in order to get the items into Output window or task list, we can use the following piece of code.
Dim projItem As EnvDTE.Solution
Dim tw As TaskList = CType(win.Object, TaskList)
win = projItem.DTE.Windows.Item(Constants.vsWindowKindTaskList)
tw = CType(win.Object, TaskList)tw.TaskItems.Add("ErrorCategory", Document.Name, "Error Message", vsTaskPriority.vsTaskPriorityHigh, , True, Document.Name, -1, True, True)
-- Ashutosh
Subscribe to:
Posts (Atom)