Hi all,
i have downloaded and installed the new version of C# and VB inside the
Visual Studio.NET 2005 suite (beta)
I have try to build some simple test's program and i have found that in VB
i can use the My namespace like My.Application or My.User or My.Forms
I was not able to find they in the C# languages.
I was so surprised and i have made an internet's search and i have find
that C# don't give support for the My namespace.
I think that this is not the most "smart" strategic choice maded by
Microsoft.
I dont' reach to find any reason of dropping support for My namespace in
C# and in the same way i cannot reach to understand why VB don't have
anonymous method.
Please explain to my why MS boys take this "strange" decisions !?!??!?
Stefano 8 1622
Do you mean the "Me" keyword? I believe it is "this" in C#
Chris
"Stefano Del Furia" <de***@tech-center.com> wrote in message
news:opslk587lnvqn431@nemo... Hi all, i have downloaded and installed the new version of C# and VB inside the Visual Studio.NET 2005 suite (beta) I have try to build some simple test's program and i have found that in VB i can use the My namespace like My.Application or My.User or My.Forms I was not able to find they in the C# languages. I was so surprised and i have made an internet's search and i have find that C# don't give support for the My namespace. I think that this is not the most "smart" strategic choice maded by Microsoft. I dont' reach to find any reason of dropping support for My namespace in C# and in the same way i cannot reach to understand why VB don't have anonymous method. Please explain to my why MS boys take this "strange" decisions !?!??!? Stefano
No, i mean the My Namespace.
This give access to a lot of class about users, computer network and so on.
By
Stefano
In data Wed, 2 Feb 2005 14:14:45 -0600, Chris, Master of All Things
Insignificant <chris@No_Spam_Please.com> ha scritto: Do you mean the "Me" keyword? I believe it is "this" in C#
Chris
"Stefano Del Furia" <de***@tech-center.com> wrote in message news:opslk587lnvqn431@nemo... Hi all, i have downloaded and installed the new version of C# and VB inside the Visual Studio.NET 2005 suite (beta) I have try to build some simple test's program and i have found that in VB i can use the My namespace like My.Application or My.User or My.Forms I was not able to find they in the C# languages. I was so surprised and i have made an internet's search and i have find that C# don't give support for the My namespace. I think that this is not the most "smart" strategic choice maded by Microsoft. I dont' reach to find any reason of dropping support for My namespace in C# and in the same way i cannot reach to understand why VB don't have anonymous method. Please explain to my why MS boys take this "strange" decisions !?!??!? Stefano
I dont' reach to find any reason of dropping support for My namespace in C#
Since it was never there, nothing is being dropped.
and in the same way i cannot reach to understand why VB don't have anonymous method.
Believe it or not, but even Microsoft have restrictions on the number
of features they can implement if they ever want to ship a product.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
If the My namespace is available to VB it's available to C# as long as the
correct references are made.
OTTOMH try referencing the VisualBasic namespace.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Stefano Del Furia" <de***@tech-center.com> wrote in message
news:opslk587lnvqn431@nemo... Hi all, i have downloaded and installed the new version of C# and VB inside the Visual Studio.NET 2005 suite (beta) I have try to build some simple test's program and i have found that in VB i can use the My namespace like My.Application or My.User or My.Forms I was not able to find they in the C# languages. I was so surprised and i have made an internet's search and i have find that C# don't give support for the My namespace. I think that this is not the most "smart" strategic choice maded by Microsoft. I dont' reach to find any reason of dropping support for My namespace in C# and in the same way i cannot reach to understand why VB don't have anonymous method. Please explain to my why MS boys take this "strange" decisions !?!??!? Stefano
Perhaps there is a different way to get the same information in C#.
Tell us what those things do, and maybe we can tell you how to do it in
C#.
>If the My namespace is available to VB it's available to C# as long as the correct references are made.
Not all of it. Some parts (e.g. My.Forms) depends on compiler
generated code.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Stefano Del Furia wrote: I was so surprised and i have made an internet's search and i have find that C# don't give support for the My namespace.
You can use Visual Basic .NET My services from C# as well, by adding a
reference to Microsoft.VisualBasic.dll to your project.
Here is an example of how to use various "My" services in C#:
class MyClass
{
static void Main(string[] args)
{
// Play a wave sound
Microsoft.VisualBasic.MyServices.MyAudio myAudio = new
MyAudio();
myAudio.Play("mySound.wav");
// Display details about the computer.
Microsoft.VisualBasic.MyServices.MyComputer myComputer =
new MyComputer();
Console.WriteLine("Name: " + myComputer.Name);
Console.WriteLine("Connected to network? " +
myComputer.Network.IsAvailable.ToString());
}
}
Anders Norås http://dotnetjunkies.com/weblog/anoras/
"Stefano Del Furia" <de***@tech-center.com> wrote in message
news:opslk587lnvqn431@nemo... Hi all, i have downloaded and installed the new version of C# and VB inside the Visual Studio.NET 2005 suite (beta) I have try to build some simple test's program and i have found that in VB i can use the My namespace like My.Application or My.User or My.Forms I was not able to find they in the C# languages.
There are often features that are not ported from one programming language
to another. Sometimes because the teams involved don't have time, sometimes
because they're slated for a future release, and sometimes because they
don't fit will to the language philosophy. For example, VB has support for
leaving optional parameters out, while C# does not. The VB philosophy is to
provide a rich developer experience, whilst C# tries to give power and
expressiveness.
Some features in C# 2005, but not in VB: Template Expansions, Iterators,
Anonymous Methods
Features in VB, but not C#: My Namespaces, Default Forms, and I've drawn a
blank for others, although I'm sure there must be some
I was so surprised and i have made an internet's search and i have find that C# don't give support for the My namespace. I think that this is not the most "smart" strategic choice maded by Microsoft.
Many people would disagree with you. I heard much unhappiness that VB was
getting this weird thing called My namespaces. If the VB community was
divided, I'd imagine the C# community would have been rioting in the
streets. Not that I'm accusing C# programmers of being stroppy or anything
;-D
I dont' reach to find any reason of dropping support for My namespace in C# and in the same way i cannot reach to understand why VB don't have anonymous method.
You can't drop what was never there. As for anonymous methods, I wouldn't
get upset about that. Their main use will be in making event handlers easier
to code, and VB does that well enough for you. The primary, no 1 reason I
switched from VB to C# was when I heard that VB wasn't getting iterators.
They'd happily put in junk like My Namespaces and Default Forms, but not
iterators which would have dramatically cut my actual work load.
Please explain to my why MS boys take this "strange" decisions !?!??!? Stefano
Often for very good reasons. I may whinge bitterly about the direction VB
has taken, but the fact of the matter is that it has a clearly defined
vision and is following that. As has C#. You may not agree with some of the
decisions (and I certainly don't), but that doesn't neccesarily make them
bad decisions for the product team. It makes them bad decisions for you :-D This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John L. Clark |
last post by:
I am curious as to the rationale, and effect, of having default
namespaces not applying (directly) to attributes (see
http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute
without a...
|
by: Mike Dickens |
last post by:
hi,
i'm sure this has come up before but havn't managed to find an answer.
if i have the following xslt
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet method="xml" version="1.0"...
|
by: Don Wash |
last post by:
Hi There!
I just need some advice on Namespace management for creating reusable VB.NET
applications.
I would like my applications to have this namespace structure...
Namespace MyCompany
...
|
by: Petter Reinholdtsen |
last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to
compile a program using 'using namespace std;' at the top. The reason
seem to be that the compiler refuses to accept 'using...
|
by: puzzlecracker |
last post by:
after reading some of the post I found out something rather radical to
my previous understanding: that when you do
#include<iostream>
#include<string>
#include<vector>
etc
compiler puts...
|
by: Tony Johansson |
last post by:
Hello!
I'm reading a book about C++ and there is something that I don't understand
so I ask you.
Below I have the text from the book and the code from the file where main is
located and some...
|
by: Kevin Newman |
last post by:
I've been toying with a namespace manager, and wanted to get some input.
So what do you think?
if (typeof com == 'undefined') var com = {};
if (!com.unFocus) com.unFocus = {};
...
|
by: Tiraman |
last post by:
Hi ,
I would like to use nested namespace .
I have 3 namespace as dll's :
Namespace A
Namespace B
Namespace C
And i want to have some namespace that contain them all , some thing like
|
by: Jeff Brown |
last post by:
Hi,
I suspect that this isn't possible, but I figured I'd ask.
My project has a root namespace, let's say it's "Root", that applies to
almost every source file (which is why I've set it as the...
| |
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |