473,703 Members | 4,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does it mean?

Hi,

Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item .Cells[i].Controls[0];
Thanks.

Jason
Nov 17 '05 #1
13 5044
This is a cast.(type casting), have a look at this article to see if it
explains things for you
http://www.csharphelp.com/archives2/archive336.html

Hope this helps

Publicjoe

C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Tutorial at http://www.publicjoe.f9.co.uk/vbnet/vbnet.html
VB Ebook at http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html
Mirrors at http://dowhileloop.com/publicjoe/ and
http://publicjoe.dowhileloop.com

"Jason Huang" <Ja************ @hotmail.com> wrote in message
news:Ol******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item .Cells[i].Controls[0];
Thanks.

Jason

Nov 17 '05 #2

"Jason Huang" <Ja************ @hotmail.com> wrote in message
news:Ol******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item .Cells[i].Controls[0];


Typecasting, so that the result of 'e.Item.Cells[i].Controls[0];' is an
object of the type 'TextBox'

--
Søren Reinke
www.Xray-Mag.com/ - Your free diving magazin on the net.
Current issue Diving in North America, 99 pages.
Download it in PDF
Nov 17 '05 #3
Looks like 'e' is a grid or list of some kind... possibly a third party
control.
The Item method allows you to dig into the list elements of the control.

Cells[i] is an array of cells or list elements. This looks like a single
list or a one-column grid?
So, the value [i] selects the "i"th element in the list (usually counting
from zero).
Note: if the list does not have "i" elements in it, then this statement will
generate an error.

It looks like each cell in your control can hold multiple controls
(perfectly valid). However, the original programmer expects that there is
at least one control in that cell. s/he refers to that first control in the
cell as controls[0]. Note: if the cell does not contain a control, this
statement will generate an error.

The same developer expects that the first control is a text box. Note: if
it is not a textbox, this statement will generate an error.

The developer used casting to let the language know that it should treat the
first control, in the controls list, as a text box.
That value is assigned to the variable CurrentText

Note: if the variable CurrentText is a string variable, then the original
developer should probably have called a method on the TextBox to return the
actual text contents. That is probably the intent, although it isn't coded
that way.

Therefore, assuming this statement compiles, this statement will return the
textbox control from a cell in an editable list or grid, or it throws one of
many runtime errors.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Jason Huang" <Ja************ @hotmail.com> wrote in message
news:Ol******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item .Cells[i].Controls[0];
Thanks.

Jason

Nov 17 '05 #4
The previous posts are correct and sufficient.

Might I recommend that you use "as" instead of a cast. This is for
converting compatible types. It will only perform reference conversions and
boxing conversions. The "as" is equivalent to:

expression is type ? (type) expression : (type) null

Note the extra safety in checking the type prior to performing the
conversion. Should the expression in the above not be of the type you are
looking for, it returns null. If you cast like this:

(type) expression

and the type in the expression is not compatible with type, then a
System.InvalidC astException exception will be thrown.

Hope this helps...

Frisky
"Jason Huang" <Ja************ @hotmail.com> wrote in message
news:Ol******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item .Cells[i].Controls[0];
Thanks.

Jason

Nov 17 '05 #5
Frisky <Fr***********@ NorthPole.net> wrote:
The previous posts are correct and sufficient.

Might I recommend that you use "as" instead of a cast. This is for
converting compatible types. It will only perform reference conversions and
boxing conversions. The "as" is equivalent to:

expression is type ? (type) expression : (type) null

Note the extra safety in checking the type prior to performing the
conversion. Should the expression in the above not be of the type you are
looking for, it returns null. If you cast like this:

(type) expression

and the type in the expression is not compatible with type, then a
System.InvalidC astException exception will be thrown.


"as" and casting serve slightly different purposes. When it is a
programming error for the value of a variable *not* to be a reference
to a certain type of object, I use a cast. If it's not an error, and I
just want to do something different if it's not an appropriate
reference, that's when as is useful.

For instance, taking values out of a private ArrayList, I'd always use
a cast - if the value isn't of the right type, I've got an error
elsewhere in my code, and an InvalidCastExce ption is just as good as
anything else. Otherwise you get a lot of code bloat for checking for
null unnecessarily.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #6
Jon,

I complely agree with you. There certainly are reasons to cast versus using
"as". However, I believe the reasons are for casting values, which "as" does
not handle.

Otherwise, use "as". It is safer and more efficient at runtime. "As" and
"is" do not perform user-defined conversions. They succeed only if the
runtime type matches the sought type. The never construct a new object to
satisfy a request.

So, if I were to code something like this, I might write:

BusinessType myBusiness = Factory.CreateO bject() as BusinessType;
if (myBusiness != null) {
myBusiness.DoSt uff();
}

If I were to use the cast, it would look like:

try {
BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();
if (yourBusiness != null) {
yourBusiness.Do Stuff();
}
}
catch (Exception ex) {
System.Diagnost ic.Debug.WriteL ine("Exception: " + ex.ToString());
// handle exception
}

So, it is a lot less code when you have to check.

As far as a private array goes, I agree that you could simply cast the
value. But, there is no reason to do this. The "as" is more efficient
because it only checks the runtime types. If they don't match the criteria,
null is returned. And, if you use typed collections like we do, there is no
reason to cast anyway.

But back to the problem described here. This is not a private array. In
point of fact, this is a very public and very variant array. The check is
warrented. We do not know what type of control might be in the Control array
of a particular Cell of a particular Item. This is a classic example of why
to check.

I am not sure what you mean by bloat? (So many people are using that these
days.) Is it the few extra bytes of code I generated? I have already shown
that the "as" is more efficient and requires less code to implement. I know,
I know, your gonna say you could have just said:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

or more along the lines of the example you gave:

YourObject yourObject = (YourObject) yourArray[index];

But, the "as" equivalent:

YourObject yourObject = yourArray[index] as YourObject;

is no less efficient than the other version, does not throw (which is really
expensive), and will not attempt to perform user conversions or create a new
object.
BTW: Am I stepping on your turf or someting?

--
Frisky

Intellectuals solve problems; geniuses prevent them. ~ Albert Einstein
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Frisky <Fr***********@ NorthPole.net> wrote:
The previous posts are correct and sufficient.

Might I recommend that you use "as" instead of a cast. This is for
converting compatible types. It will only perform reference conversions
and
boxing conversions. The "as" is equivalent to:

expression is type ? (type) expression : (type) null

Note the extra safety in checking the type prior to performing the
conversion. Should the expression in the above not be of the type you are
looking for, it returns null. If you cast like this:

(type) expression

and the type in the expression is not compatible with type, then a
System.InvalidC astException exception will be thrown.


"as" and casting serve slightly different purposes. When it is a
programming error for the value of a variable *not* to be a reference
to a certain type of object, I use a cast. If it's not an error, and I
just want to do something different if it's not an appropriate
reference, that's when as is useful.

For instance, taking values out of a private ArrayList, I'd always use
a cast - if the value isn't of the right type, I've got an error
elsewhere in my code, and an InvalidCastExce ption is just as good as
anything else. Otherwise you get a lot of code bloat for checking for
null unnecessarily.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #7
Jon,

I complely agree with you. There certainly are reasons to cast versus using
"as". However, I believe the reasons are for casting values, which "as" does
not handle.

Otherwise, use "as". It is safer and more efficient at runtime. "As" and
"is" do not perform user-defined conversions. They succeed only if the
runtime type matches the sought type. The never construct a new object to
satisfy a request.

So, if I were to code something like this, I might write:

BusinessType myBusiness = Factory.CreateO bject() as BusinessType;
if (myBusiness != null) {
myBusiness.DoSt uff();
}

If I were to use the cast, it would look like:

try {
BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();
if (yourBusiness != null) {
yourBusiness.Do Stuff();
}
}
catch (Exception ex) {
System.Diagnost ic.Debug.WriteL ine("Exception: " + ex.ToString());
// handle exception
}

So, it is a lot less code when you have to check.

As far as a private array goes, I agree that you could simply cast the
value. But, there is no reason to do this. The "as" is more efficient
because it only checks the runtime types. If they don't match the criteria,
null is returned. And, if you use typed collections like we do, there is no
reason to cast anyway.

But back to the problem described here. This is not a private array. In
point of fact, this is a very public and very variant array. The check is
warrented. We do not know what type of control might be in the Control array
of a particular Cell of a particular Item. This is a classic example of why
to check.

I am not sure what you mean by bloat? (So many people are using that these
days.) Is it the few extra bytes of code I generated? I have already shown
that the "as" is more efficient and requires less code to implement. I know,
I know, your gonna say you could have just said:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

or more along the lines of the example you gave:

YourObject yourObject = (YourObject) yourArray[index];

But, the "as" equivalent:

YourObject yourObject = yourArray[index] as YourObject;

is no less efficient than the other version, does not throw (which is really
expensive), and will not attempt to perform user conversions or create a new
object.
BTW: Am I stepping on your turf or someting?

--
Frisky

Intellectuals solve problems; geniuses prevent them. ~ Albert Einstein
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Frisky <Fr***********@ NorthPole.net> wrote:
The previous posts are correct and sufficient.

Might I recommend that you use "as" instead of a cast. This is for
converting compatible types. It will only perform reference conversions
and
boxing conversions. The "as" is equivalent to:

expression is type ? (type) expression : (type) null

Note the extra safety in checking the type prior to performing the
conversion. Should the expression in the above not be of the type you are
looking for, it returns null. If you cast like this:

(type) expression

and the type in the expression is not compatible with type, then a
System.InvalidC astException exception will be thrown.


"as" and casting serve slightly different purposes. When it is a
programming error for the value of a variable *not* to be a reference
to a certain type of object, I use a cast. If it's not an error, and I
just want to do something different if it's not an appropriate
reference, that's when as is useful.

For instance, taking values out of a private ArrayList, I'd always use
a cast - if the value isn't of the right type, I've got an error
elsewhere in my code, and an InvalidCastExce ption is just as good as
anything else. Otherwise you get a lot of code bloat for checking for
null unnecessarily.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #8
Frisky <Fr***********@ NorthPole.net> wrote:
I complely agree with you. There certainly are reasons to cast versus using
"as". However, I believe the reasons are for casting values, which "as" does
not handle.

Otherwise, use "as". It is safer and more efficient at runtime. "As" and
"is" do not perform user-defined conversions. They succeed only if the
runtime type matches the sought type. The never construct a new object to
satisfy a request.

So, if I were to code something like this, I might write:

BusinessType myBusiness = Factory.CreateO bject() as BusinessType;
if (myBusiness != null) {
myBusiness.DoSt uff();
}

If I were to use the cast, it would look like:

try {
BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();
if (yourBusiness != null) {
yourBusiness.Do Stuff();
}
}
catch (Exception ex) {
System.Diagnost ic.Debug.WriteL ine("Exception: " + ex.ToString());
// handle exception
}

So, it is a lot less code when you have to check.
You should almost never *actually* catch exceptions at the point
they're generated. They should bubble up.

Any proper factory that's asked to create an object should either throw
an exception or create the appropriate object. If it's returning
something other than the appropriate type I'm expecting, I almost
certainly want an exception. I'd write your code as:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

I don't see the problem.
As far as a private array goes, I agree that you could simply cast the
value. But, there is no reason to do this. The "as" is more efficient
because it only checks the runtime types. If they don't match the criteria,
null is returned. And, if you use typed collections like we do, there is no
reason to cast anyway.
Casting and "as" are equally efficient when there aren't conversions
involved, and that's decided at compile-time, not runtime.
But back to the problem described here. This is not a private array. In
point of fact, this is a very public and very variant array. The check is
warrented. We do not know what type of control might be in the Control array
of a particular Cell of a particular Item. This is a classic example of why
to check.
If you genuinely don't know *and* you want to handle the situation
where the result isn't a TextBox, sure. I would probably just throw an
exception there anyway though, in most cases.
I am not sure what you mean by bloat? (So many people are using that these
days.) Is it the few extra bytes of code I generated? I have already shown
that the "as" is more efficient and requires less code to implement.
No, because you're checking for null manually rather than letting the
cast do the check for you and throw the exception appropriately. The
important part of the bloat here is the source bloat - the extra check
takes up precious space that could be getting on with what you actually
want to be doing. That's the joy of using exceptions rather than return
values - most of your actual code gets on with what you want to do,
rather than error checking.
I know,
I know, your gonna say you could have just said:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

or more along the lines of the example you gave:

YourObject yourObject = (YourObject) yourArray[index];
ArrayList, actually. If you've got an actual array, I'd expect it to be
the right type to start with.
But, the "as" equivalent:

YourObject yourObject = yourArray[index] as YourObject;

is no less efficient than the other version, does not throw (which is really
expensive), and will not attempt to perform user conversions or create a new
object.
But I almost always *want* it to throw - and to get the "as" version to
throw, you have to put more code in.

As for user conversions - as I said before, that's decided at compile-
time, not run-time, so there's no bloat there, and the only times they
*would* be used would be when I'd want them anyway. No new objects will
be created when conversions aren't invoked.
BTW: Am I stepping on your turf or someting?


Not at all. I just happen to disagree with you on code style.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #9
Intellectuals solve problems; geniuses prevent them. ~ Albert Einstein
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Frisky <Fr***********@ NorthPole.net> wrote:
I complely agree with you. There certainly are reasons to cast versus
using
"as". However, I believe the reasons are for casting values, which "as"
does
not handle.

Otherwise, use "as". It is safer and more efficient at runtime. "As" and
"is" do not perform user-defined conversions. They succeed only if the
runtime type matches the sought type. The never construct a new object to
satisfy a request.

So, if I were to code something like this, I might write:

BusinessType myBusiness = Factory.CreateO bject() as BusinessType;
if (myBusiness != null) {
myBusiness.DoSt uff();
}

If I were to use the cast, it would look like:

try {
BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();
if (yourBusiness != null) {
yourBusiness.Do Stuff();
}
}
catch (Exception ex) {
System.Diagnost ic.Debug.WriteL ine("Exception: " + ex.ToString());
// handle exception
}

So, it is a lot less code when you have to check.
You should almost never *actually* catch exceptions at the point
they're generated. They should bubble up.

Any proper factory that's asked to create an object should either throw
an exception or create the appropriate object. If it's returning
something other than the appropriate type I'm expecting, I almost
certainly want an exception. I'd write your code as:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

I don't see the problem.


<grin>Like I said you would say. (See below)</grin>

Stick to the point. You should use "as" not casts whereever possible. Where
your catch does not change which you should use.

But, if you would like to save yourself all of the exception processing, a
simple check for null will do the trick. You code will be faster, and you
won't have to find another place to hide some exception code. You have
prevented the problem prior to it occurring.

In most instances, the exception, which must eventually be caught, will end
up doing nothing. By bubbling the throw up, I just skipped the rest of the
code in that method. So, if the rest of the code would have run, it won't
now. This may be what you wanted, but with the null check you can do either.
And the null check costs virtually nothing.
As far as a private array goes, I agree that you could simply cast the
value. But, there is no reason to do this. The "as" is more efficient
because it only checks the runtime types. If they don't match the
criteria,
null is returned. And, if you use typed collections like we do, there is
no
reason to cast anyway.


Casting and "as" are equally efficient when there aren't conversions
involved, and that's decided at compile-time, not runtime.


Are you conceeding my point? So, "as" and cast are equivalent in the worst
case, and "as" is faster in the best case. Like I said, always use "as"
unless you can't.

The code example given is most definitley a runtime type check. There is
know way the compiler can possibly know if the type of an item placed in the
control array is a particular control. It only knows that it "is a" Control.
This check and possible exception are generated at runtime.

(Check out the article http://www.codeproject.com/csharp/csharpcasts.asp)
While I have not verified his results, my results were similar.
But back to the problem described here. This is not a private array. In
point of fact, this is a very public and very variant array. The check is
warrented. We do not know what type of control might be in the Control
array
of a particular Cell of a particular Item. This is a classic example of
why
to check.


If you genuinely don't know *and* you want to handle the situation
where the result isn't a TextBox, sure. I would probably just throw an
exception there anyway though, in most cases.


There is nothing here that says you should not use "as". Again, as you
stated above, it is at least as efficient in the worst case. Oh, and if you
don't check for null, it will still throw. But see below for why you might
not want to do that.
I am not sure what you mean by bloat? (So many people are using that
these
days.) Is it the few extra bytes of code I generated? I have already
shown
that the "as" is more efficient and requires less code to implement.


No, because you're checking for null manually rather than letting the
cast do the check for you and throw the exception appropriately. The
important part of the bloat here is the source bloat - the extra check
takes up precious space that could be getting on with what you actually
want to be doing. That's the joy of using exceptions rather than return
values - most of your actual code gets on with what you want to do,
rather than error checking.


Well, this of course depends on how you write your code. If you don't mind
poor performance, throw all over the place. The combined "as" and null check
are still way less impact to your code that the cast. And, when you do
throw, the cost is huge.
I know,
I know, your gonna say you could have just said:

BusinessType yourBusiness = (BusinessType) Factory.CreateO bject();

or more along the lines of the example you gave:

YourObject yourObject = (YourObject) yourArray[index];


ArrayList, actually. If you've got an actual array, I'd expect it to be
the right type to start with.


First, I do not know how you would know, based on the code here, exactly how
this array was implemented. And if it was trully an array, what type it was
defined on. An array does not have to be of your particular type. It might
be of a base type or object type.

And yes, it works with ArrayList, HashTables, etc. too.
But, the "as" equivalent:

YourObject yourObject = yourArray[index] as YourObject;

is no less efficient than the other version, does not throw (which is
really
expensive), and will not attempt to perform user conversions or create a
new
object.


But I almost always *want* it to throw - and to get the "as" version to
throw, you have to put more code in.

As for user conversions - as I said before, that's decided at compile-
time, not run-time, so there's no bloat there, and the only times they
*would* be used would be when I'd want them anyway. No new objects will
be created when conversions aren't invoked.


First, here is fundamental difference. I *don't want* to throw. If I am
going to throw, I know there is a *huge* overhead. I need to be judicious
and make sure that throwing is correct for this particular problem.
Validating UI objects should almost always involve checking and not throwing
because of performance. Also, again, I can continue with other updates to
the UI even if this one control is not behaving.

Second, there is no more code required to throw. When the "as" is performed,
if it fails, you get null. If you attempt to use the null, as in the long
string of code originally shown, you will most certainly throw an exception.

I don't know how you would know based on the code shown if a user conversion
exists or not. Are you saying because we havn't shown one. I have seen this
assumption bite many people. But, again, check out the article, and perform
your own tests. I am not worried about bloat, but performance.

I don't think either of these methods bloats the code. One is just faster
than the other. (Not bloat; performance) And the slower casting method does
not afford me any value add.
BTW: Am I stepping on your turf or someting?


Not at all. I just happen to disagree with you on code style.


Just though I would ask. And, actually, the reason I asked is because of the
reason you stated. You have disagreed with everything I wrote. But, I have
noticed similar commnents in other articles in this group, which you
ignored. ???

I certainly do not mind that you and I going back and forth. This is
healthy, and both of us stand to learn something. Right?

However, I would perfer a more contructive approach. A cooperative attitude
would be nice. Even if you don't like my code style. I like it a lot. And I
respect yours.
--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
14762
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
3
29677
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification says: "The 'visibility' property takes the value 'collapse' for row, row group, column, and column group elements. This value causes the entire row or column to be removed from the display, and the space normally taken up by the row or column to...
86
7773
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that: http://www.clagnut.com/blog/348/ I hope that's going to be a good discussion! Michael
44
4234
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there must be many know the answer here. thanks
2
10214
by: Steve Richter | last post by:
What does the "." mean in the following sql script stmts? use GO if exists (select * from dbo.sysobjects where id = object_id(N'.') and OBJECTPROPERTY(id,N'IsUserTable') = 1) drop table . GO
121
10100
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
51
4534
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is there something wrong in there? -------------------------------------------------------------------- Types A type is a definition for a sequence of storage bits. It gives the meaning of the data stored in memory. If we say that the object a is an
1
8740
by: Frank Rizzo | last post by:
Some of the classes in the framework are marked as thread-safe in the documentation. In particular the docs say the following: "Any public static (*Shared* in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe." What exactly does this mean? Does this mean that if I call a shared method from 2 different threads, nothing whacky will happen? Also when it says that instance members...
9
550
by: JoeC | last post by:
m_iWidth = (int)pBitmapInfo->bmiHeader.biWidth; m_iHeight = (int)pBitmapInfo->bmiHeader.biHeight; What does this mean? I have seen v=&var->member.thing; but what does it mean when you change the & for int?
0
9125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5923
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2463
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.