Csharp 26 new messages in 17 topics

==============================================================================
TOPIC: C# plans towards metaprogramming
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/64e153216222ff82?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 5:18 pm
From: "Peter Bromberg [C# MVP]"


I saw a recent article on codeproject.com with an managed code
implementation of C++ Templates for .NET. That might satisfy your curiosity
while you are waiting for the "next version" of C#.
Peter
"Valery" <valerka@gmail.com> wrote in message
news:94b068b0-41b4-46ea-b728-f394c08e32da@p39g2000prm.googlegroups.com...
> What is known about C# generics closing the gap with C++ templates in
> the future? Template specialization is especially badly missed. What
> new language features are coming in the next release of C#?






==============================================================================
TOPIC: Using MS SQL Express in my C# App
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/19f9377dbede22ad?hl=en
==============================================================================

== 1 of 4 ==
Date: Thurs, May 8 2008 6:00 pm
From: Todd Carnes


I'm writing my first app that uses SQL Express to store a bunch of user
data (vice using a simple txt file, etc.), but I have a question that
you guys who've been doing this a while will probably laugh at.

Once I've completed my app, will I have to ship SQL Express with my app
in order for people to use my program?

Todd




== 2 of 4 ==
Date: Thurs, May 8 2008 10:02 pm
From: Morten Wennevik [C# MVP]


Hi Todd,

Not necessarily.  If the user already has an SQL server he should be able to
use the existing one instead of adding a new.  If you put this as a
requirement to use your program you can leave it up to the user to take care
of it, but if it is likely that the user does not already have an SQL server
you should consider shipping SQL Express with your program.  There are some
licensing issues with this which I believe is only down to registering that
you intend to ship sql express along with your program

[How to Obtain SQL Server 2005 Express Edition]
http://www.microsoft.com/sql/editions/express/howtobuy.mspx


--
Happy Coding!
Morten Wennevik [C# MVP]


"Todd Carnes" wrote:

> I'm writing my first app that uses SQL Express to store a bunch of user
> data (vice using a simple txt file, etc.), but I have a question that
> you guys who've been doing this a while will probably laugh at.
>
> Once I've completed my app, will I have to ship SQL Express with my app
> in order for people to use my program?
>
> Todd
>




== 3 of 4 ==
Date: Thurs, May 8 2008 10:15 pm
From: Todd Carnes


Morten Wennevik [C# MVP] wrote:
> Hi Todd,
>
> Not necessarily.  If the user already has an SQL server he should be able to
> use the existing one instead of adding a new.  If you put this as a
> requirement to use your program you can leave it up to the user to take care
> of it, but if it is likely that the user does not already have an SQL server
> you should consider shipping SQL Express with your program.  There are some
> licensing issues with this which I believe is only down to registering that
> you intend to ship sql express along with your program
>
> [How to Obtain SQL Server 2005 Express Edition]
> http://www.microsoft.com/sql/editions/express/howtobuy.mspx
>
>

Thank you for your help. :)

Todd




== 4 of 4 ==
Date: Thurs, May 8 2008 10:30 pm
From: Marc Scheuner


>Once I've completed my app, will I have to ship SQL Express with my app
>in order for people to use my program?

Yes - SQL Express needs to be present and isntalled at your customer's
site (or a full SQL Server version).

The "embedded" SQL Server that consists merely of a bunch of DLLs is
called "SQL Server Compact" - there you can ship everything with your
app, but it's limited in some ways.

http://www.microsoft.com/sql/editions/compact/default.mspx

Cheers
Marc





==============================================================================
TOPIC: Odd Problem with SetParent
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/59f2e9e8708a65a9?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 6:07 pm
From: "Doug Forster"


Hi Matt,

>>The message pump really shouldn't matter.

Of course it matters. Its message pump is not only on a different thread but
in a different process. We could speculate for example that the 'child'
thread attempts to route its messages to the outer frame window or some
other one of yours and then attempts to call its WindowProc. But this is in
a different process so different address space so the Window proc address is
garbage to the 'child'. So maybe it gets an exception and swallows the
message. Who knows really, but I'd be surprised if you could get this to
work.

Cheers
Doug Forster





== 2 of 2 ==
Date: Thurs, May 8 2008 8:58 pm
From: "Peter Duniho"


On Thu, 08 May 2008 18:07:22 -0700, Doug Forster <nobody@nowhere.com>
wrote:

> Hi Matt,
>
>>> The message pump really shouldn't matter.
>
> Of course it matters. Its message pump is not only on a different thread
> but in a different process. We could speculate for example that the
> 'child' thread attempts to route its messages to the outer frame window
> or some other one of yours and then attempts to call its WindowProc. But
> this is in a different process so different address space so the Window
> proc address is garbage to the 'child'. So maybe it gets an exception
> and swallows the message. Who knows really, but I'd be surprised if you
> could get this to work.

Well, as the OP already said...for most applications it works fine, and
for iTunes it works fine at least at first.

Actually, it is not entirely uncommon for one process to host the window
of another process within itself.  For example, OLE uses this for
out-of-proc servers.  Windows will send the messages to the appropriate
window via the appropriate message queue (and thus the appropriate message
pump), assuming everything else has been configured correctly.

It's been so long since I've ever done anything like this, I can't
personally help the OP.  And I really think that this newsgroup, where
most of the people are at the very least inexperienced with more
complicated unmanaged coding techniques, if not completely unfamiliar,
just isn't going to be a productive place to look for an answer.

It wouldn't surprise me if Willy or Ben, for example, know the answer to
the question but the fact is the OP is likely to have better luck in a
newsgroup where his question is actually on-topic.

Pete





==============================================================================
TOPIC: Mime Type of a file
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/bfca774863fc2a2a?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 6:57 pm
From: tinman77


Thanks in advance for everyone's help...

My problem is that more often than I would like, I get attachments
that for some reason or another do not include an extension. What I
want to do is create a C# app that based on a file on my hard drive
that I specify, will spit back to me the mime type. I can do the rest
from there.

I have looked, and looked and looked a little more for a way to
determine the type of a file that does not rely on the extension. So
far I have come up with next to nothing - a couple libraries that do
this but that's not what I'm looking for. I don't want to use a whole
extra just to find out what kind of file I have.

To clarify what I'm looking for, PHP has similar functionality using
the FileInfo class. Simple, easy and to the point. Does nothing like
this exist in C#? I have looked at different class on MSDN and
searched Google relentlessly but, I got nothing. I read something
about the Attachment class but I was having problems following the
documentation I found for it.

I have provided a general outline for the code I am looking for. Feel
free to correct me if my request is semi-outrageous.

myFile = "C:\screw-the-extension"
myFileObject = new File(myFile)
print myFileObject.MimeType

Any help is more than appreciated.





==============================================================================
TOPIC: How to access a run time generated PictureBox on the form
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/94fd6070f5e86193?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 7:26 pm
From: "Jim McGivney"


In C# on Form1 I genetate an array of PictureBoxes and populate each with an
image as seen in the code below.
Later on I want to access a specific PictureBox to change its image,  but I
keep getting the error "The name 'PictureBox1' does not exist in the current
context"
The code I use to try to access the PictureBox is "PictureBox1[Target].Image
= HoldBitMap; "  where kount is an integer.
I know the answer is probably in using the Controls collection but I can't
get the syntax correct.
Thanks in advance for your help.
Jim


       private void InitializePictureBox()
       {
           //allocate the picture box
           PictureBox[] PictureBox1 = new PictureBox[1000];
           int i;
           int j;
           int kount = 0;
           Random randObj = new Random(unchecked((int)
(DateTime.Now.Ticks)));

           //initialise each picture box
           for(i=0; i<8; i++)
           {
               for (j = 0; j < 6; j++)
               {
                   PictureBox1[kount] = new PictureBox();

                   // Set the location and size of the PictureBox control.
                   PictureBox1[kount].Location = new
System.Drawing.Point(100 * i, 100 * j);
                   PictureBox1[kount].Size = new System.Drawing.Size(99,
99);
                   PictureBox1[kount].TabStop = false;

                   // Set the SizeMode property to the StretchImage value.
This
                   // will shrink or enlarge the image as needed to fit
into
                   // the PictureBox.
                   PictureBox1[kount].SizeMode = PictureBoxSizeMode.Zoom;
//    .StretchImage;

                   // Set the border style to a three-dimensional border.
                   PictureBox1[kount].BorderStyle = BorderStyle.Fixed3D;

                   //Wire the picture boxes click to new common click
handler.
                   PictureBox1[kount].Click += new
System.EventHandler(ClickHandler);
                   PictureBox1[kount].Tag = kount;
                   // Add the PictureBox to the form.
                   Controls.Add(PictureBox1[kount]);
                   // Add the image
                   PictureBox1[kount].Image = MakeBitMap();
                   kount++;
               }
           }
       }





== 2 of 2 ==
Date: Thurs, May 8 2008 8:52 pm
From: "Peter Duniho"


On Thu, 08 May 2008 19:26:20 -0700, Jim McGivney <mcgivney@winid.com>
wrote:

> In C# on Form1 I genetate an array of PictureBoxes and populate each
> with an image as seen in the code below.
> Later on I want to access a specific PictureBox to change its image,
> but I keep getting the error "The name 'PictureBox1' does not exist in
> the current context"
> The code I use to try to access the PictureBox is
> "PictureBox1[Target].Image = HoldBitMap; "  where kount is an integer.
> I know the answer is probably in using the Controls collection but I
> can't get the syntax correct.

You could indeed use the controls collection.  However, it would be easier
and more reliable for you to just declare your array as an instance member
in your class, rather than as a local variable as you've done in the code
you posted.  Then the array would be available anywhere in your class,
rather than just that one method.

Pete





==============================================================================
TOPIC: Executing directory Path?
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/3fc3e6fb65c8f5c7?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 7:39 pm
From: bob



Well Drew,
it worked.
Thank You
Bob

On Wed, 7 May 2008 22:15:16 -0500, "DrewCE" <moc.sgodniahc@werd -
backwards> wrote:

>Try..
>
> string path =
>Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
>
>-Drew
>
>"bob" <startatbob_clegg@cutthis.adriley.co.nz> wrote in message
>news:5in4245tcbunqkbe07tlm3hd2lpe0aoi4q@4ax.com...
>> Hi,
>> I have a DLL that uses the XMLReaderSettings class say mySettings.
>> I want to add mySchema.xsd to mySettings.Schemas.
>>
>> As far as I can make out I need an absolute path to the mySchema.xsd
>> file.
>>
>> Being inside a DLL, the only way I could see to get this was using the
>> Assembly.GetAssembly().Location method.
>>
>> This worked fine on the development machine but on the production
>> machine the call was returning the root directory.
>>
>> As a kludge I put mySchema. xsd in the root directory and away we
>> went.
>>
>> Would appreciate any thoughts on how to fix this.
>>
>> thanks
>> Bob




== 2 of 2 ==
Date: Thurs, May 8 2008 7:40 pm
From: bob



Hi Parez,
Thanks for your reply.
Drew's method worked.
Bob
On Thu, 8 May 2008 14:15:04 -0700 (PDT), parez <psawant@gmail.com>
wrote:

>On May 8, 3:07 pm, bob <startatbob_cl...@cutthis.adriley.co.nz> wrote:
>> Hi Drew,
>> thanks for your reply.
>> I will try this as soon as the production machine becomes available.
>> But it seems to me that it will still fail as GetDirectoryName is
>> working on what is passed back by GetExecutingAssembly.Location
>>
>> The problem is that GetExecutingAssembly.Location passes back a valid
>> location on the development machine and the root directory on the
>> production machine.
>> I will post the result.
>> thanks
>> Bob
>>
>> On Wed, 7 May 2008 22:15:16 -0500, "DrewCE" <moc.sgodniahc@werd -
>>
>> backwards> wrote:
>> >Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
>
>this might be what you are looking for..I have not tried it myself..
>
>Assembly.GetEntryAssembly().Location.





==============================================================================
TOPIC: CHINA WHOLESALE NIKE JORDAN 1-23 SHOES FROM CHINA SUPPLIERS
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/ef8df5ed23cc79ba?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 7:46 pm
From: myshoesbiz77@yahoo.com.cn


------- WWW DOT THENIKESHOES DOT NET ------

If you are interested in any of our products, please contact our
salesman and they will respond in 24 hours after hearing from you. If
you cannot find the shoes you are seeking for in the list, please also
contact with us and send us your photos, we will do our best to find
the shoes from our partners and satisfy you with our best service.





==============================================================================
TOPIC: Excel 2007 Automation Question
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/a8c8b1f8483b1d38?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 8:19 pm
From: Mark


What I want to do is bring data into an excel 2007 worksheet that is stored
in a sql database table.

The idea is to parameterize the "where" clause in the sql select statement
limiting the result set.

There are lots of examples in the literature with regard to bringing in data
stored in cubes --- but not so much from data in sql table.

The basic issue is I want bring in descriptive information about say a
contract (things like description, signing date, etc).  Cubes which most
(all) of the literature deals with are dealing with aggregations of amounts
or "measures" and not so much about descriptions.

As always all suggestions are welcome.

Mark





==============================================================================
TOPIC: Send cookie with WebRequest
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/d83b5356f01976fb?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 9:10 pm
From: stcheng@online.microsoft.com (Steven Cheng [MSFT])


Hi Dave,

As for HttpWebRequest component, if you want to maintain cookies between
multiple WebRequest instances(and webrequest calls), you need to create an
CookieContainer instance and attach it to the WebRequest.CookieContainer
property.

Also, if you want the cookies to share between multiple WebRequest
instances, you need to make sure all of those WebRequest instances use the
same cookie container.

here are some web thread that also mentioned some code that use
CookieContainer:


#Establishing cookie based session with WebServices and HttpWebRequest
http://blogs.msdn.com/adarshk/archive/2004/08/24/219714.aspx

#Help needed with cookies and WebRequest
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=99324&SiteID=1

If you have any further questions, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "Dave" <DWeb@newsgroup.nospam>
>Subject: Send cookie with WebRequest
>Date: Thu, 8 May 2008 19:04:08 -0400
>Lines: 12
>
>string m_request = some_web_page;
>
>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request );
>
>HttpWebResponse response = (HttpWebResponse)request.GetResponse();
>
>
>
>Which works fine, but I need to set and send a cookie with the WebRequest.
>How do I do that?
>
>
>





== 2 of 2 ==
Date: Thurs, May 8 2008 9:27 pm
From: stcheng@online.microsoft.com (Steven Cheng [MSFT])


Hi Dave,

Regarding on this issue, I have found your another same thread posted in
this newsgroup. Some community member and I have posted some suggestion
there. Welcome to continue discuss in that thread.

Thanks for your posting.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Dave" <DWeb@newsgroup.nospam>
>Subject: Send cookie with WebRequest
>Date: Thu, 8 May 2008 19:06:47 -0400

>
>I'm sending data to a website with a WebRequest,
>
>string m_request = some_web_page;
>
>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request );
>
>HttpWebResponse response = (HttpWebResponse)request.GetResponse();
>
>
>
>Which works fine, but I need to set and send a cookie with the WebRequest.
>How do I do that?
>
>
>






==============================================================================
TOPIC: indexOf question
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/12a116266cc0a0f4?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:05 pm
From: Morten Wennevik [C# MVP]


Hi,

In case you want to test for an empty string use

if(string.IsNullOrEmpty("Hello World"))
{
  // string is either null or ""
}

--
Happy Coding!
Morten Wennevik [C# MVP]


"raulavi" wrote:

> vs2005 c#
> string var = string.Empty;
> why "76090,76091,76092,G0202,G0204,G0206".IndexOf(var)
> returns 0 ?
>
> should be -1 for not found...empty is not part of my string being searched
>  any ideas
> thanks





==============================================================================
TOPIC: Validating XML
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/36b4b442c09fe1b0?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:15 pm
From: Mahain


On May 8, 3:55 pm, Martin Honnen <mahotr...@yahoo.de> wrote:
> Mahain wrote:
> > I have to validate xml file against xsd file using c#.
> > XmlReader only check for the well formated doucment but i want to
> > check for every thing like space,datatype and any extra text in xml
> > file.
>
> Use an XmlReader with XmlReaderSettings set up for validation:
>
>    XmlReaderSettings settings = new XmlReaderSettings();
>    settings.ValidationType = ValidationType.Schema;
>    settings.Schemas.Add(null, "schema.xsd");
>    bool valid = true;
>    settings.ValidationEventHandler += delegate(object sender,
> ValidationEventArgs vargs)
>    {
>      if (vargs.Severity == XmlSeverityType.Error)
>      {
>        valid = false;
>      }
>      Console.WriteLine("{0}: {1}", vargs.Severity, vargs.Message);
>    };
>
>    using (XmlReader reader = XmlReader.Create(@"doc.xml", settings))
>    {
>      while (reader.Read()) {}
>    }
>    Console.WriteLine("Document is {0}.", valid ? "valid": "not valid");
>
> See also the MSDN section:
> <URL:http://msdn.microsoft.com/en-us/library/hdf992b8(VS.80).aspx>
>
> --
>
>         Martin Honnen --- MVP XML
>        http://JavaScript.FAQTs.com/

same result as XMLReader





==============================================================================
TOPIC: Print a page in 70% of it's size
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/b3ece6dbee1c56f1?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:14 pm
From: Morten Wennevik [C# MVP]


Hi Gidi,

I haven't tested it, but in your printing code I believe you should be able
to adjust the Graphics object to scale down to 70% the normal size, which
would cause the printed output to be reduced to 70% as well.

--
Happy Coding!
Morten Wennevik [C# MVP]


"Gidi" wrote:

> Hi,
>
> I've a document which i'm creating and printing.
> i want to print 2 copies:
>
> 1. regular A4 copy
> 2. 70% of A4 size (like in copy machine, where you can choose the size of
> copy).
>
> how can i do that?
>
>
> thanks,
> Gidi.





==============================================================================
TOPIC: Image looses clarity in wpf control template
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/ee2f295c62e88664?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:21 pm
From: "moondaddy"


Thanks Linda,  this is good info and I always appreciate your detailed
responses!

"Linda Liu[MSFT]" <v-lliu@online.microsoft.com> wrote in message
news:elrNEzOsIHA.1788@TK2MSFTNGHUB02.phx.gbl...
> Hi Moondaddy,
>
> I downloaded your sample project and run it on my machine. I did see the
> problem on my side. The image drawn in the Button is not as clear as that
> one drawn in the Image control.
>
> After doing some research, I found that this is a WPF layout problem.
>
> When we place a control into a parent control, if the child control's
> Width
> and Height properties are not set, the child control will be streched to
> fill the available space within the parent control; otherwise, it will be
> centered within the parent control.
>
> To make the child control drawn clearly, we need to position the child
> control precisely. To do this, we can use the HorizontalAlignment and
> Vertical Alignment properties and Margin property if necessary. Modify the
> "ccBtnLeftLine" ControlTemplate in your sample project as follows should
> solve the problem:
>
> <ControlTemplate x:Key="ccBtnLeftLine" TargetType="{x:Type
> ContentControl}">
>       <Border HorizontalAlignment="Left" VerticalAlignment="Top"
> BorderBrush="Black" BorderThickness="0.5" Width="17" Height="17"
> x:Name="border" >
>           <Image HorizontalAlignment="Left" VerticalAlignment="Top"
> Margin="0.5" Width="15" Height="15" Stretch="None"
> Source="images\btnLineLeft.gif"/>
>       </Border>
>       <ControlTemplate.Triggers>
>           <Trigger Property="IsMouseOver" Value="True">
>              <Setter Property="BorderBrush" TargetName="border"
> Value="#FF005D78"/>
>              <Setter Property="Cursor" Value="Cross"/>
>           </Trigger>
>
>       </ControlTemplate.Triggers>
> </ControlTemplate>
>
> For more information on WPF Layout System, please refer to the following
> MSDN document:
> http://msdn.microsoft.com/en-us/library/ms745058.aspx
>
> Hope this helps.
> If you have any question, please feel free to let me know.
>
> Sincerely,
> Linda Liu
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>







==============================================================================
TOPIC: Structure C# internals
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/c7950054ff777c56?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:25 pm
From: Navaneeth.K.N


Hi

Thanks again for the reply. I will be glad if you can look into the
following point.

1 - As per this
(http://msdn.microsoft.com/hi-in/library/34yytbws(en-us,VS.80).aspx) MSDN
article, .NET having two types of value-types. Built in and user-defined.
They say user defined types are derived from "System.ValueType". But what
about int32, boolean etc ? Is that also derived from "System.ValueType" ?

2 - IL allows deriving from System.ValueType. But why C# is restricting us
to derive from that ? any ideas ?

Thanks again

Navaneeth





==============================================================================
TOPIC: namespaces
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/1ac534761e857fce?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 10:58 pm
From: "Tem"


"The scope of a namespace member declared by a namespace-member-
declaration within a namespace-declaration whose fully qualified name
is N, is the namespace-body of every namespace-declaration whose fully
qualified
name is N or starts with N, followed by a period."

so which one is better? or perferred?


"Brian Gideon" <briangideon@yahoo.com> wrote in message
news:f4cde640-6059-489b-a3ec-b5e6c455d5a1@l42g2000hsc.googlegroups.com...
On May 6, 3:11 am, "Tem" <tem1...@yahoo.com> wrote:
> Are these equivalent?
>
> ------------------
> using System;
>
> namespace SomeNamespace
> {
>
> }
>
> -------------------
> namespace SomeNamespace
> {
> using System;
>
>
>
> }

In that particular case, yes.  But, like Jon said, it can make a
difference.  I discovered this oddity and posted it in this group
quite some time ago hoping someone could point me to the section in
the specification that discusses it.  I did some scouring of my own
and I believe the crucial section is 10.7 (ECMA) where it says:

"The scope of a namespace member declared by a namespace-member-
declaration within a namespace-declaration whose fully qualified name
is N, is the
namespace-body of every namespace-declaration whose fully qualified
name is N
or starts with N, followed by a period."

Clear as mud huh?






==============================================================================
TOPIC: What type connection is the fastest in C# to SQL Server
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/6b0a3e5f9e68f303?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 11:27 pm
From: "Richard"


Can someone give me some insight in what type
of connection is the fastest to connect to SQL Server.

Thx in Advance







==============================================================================
TOPIC: Formatting a column in a datagridview to currency
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/e84e9ef0defa3c36?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, May 8 2008 11:53 pm
From: Cdude


I am using this code at the moment to format the column

this.itemsDataGrid.Columns["Amount"].DefaultCellStyle.Format = "c";

but i get the error "Object reference not set to an instance of an
object. " is this code incorrect ?
Any suggestions please




== 2 of 3 ==
Date: Fri, May 9 2008 12:07 am
From: Cdude


On May 9, 8:53 am, Cdude <camelj...@yahoo.com> wrote:
> I am using this code at the moment to format the column
>
> this.itemsDataGrid.Columns["Amount"].DefaultCellStyle.Format = "c";
>
> but i get the error "Object reference not set to an instance of an
> object. " is this code incorrect ?
> Any suggestions please

Got it thanks




== 3 of 3 ==
Date: Fri, May 9 2008 12:07 am
From: Marc Gravell


Well, is there a column named "Amount"?

Note that a *column* named "Amount" is different to a column that is
mapped to the *property* named "Amount"...

Marc




==============================================================================


No comments: